Skip to content

Commit 8959634

Browse files
authored
Merge pull request #171 from rokwire/release/v1.2.4
Release/v1.2.4
2 parents 35d00f2 + 66523c8 commit 8959634

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [1.2.4] - 2022-09-30
10+
### Added
11+
- Check if user has 'managed_group_admin' permission [#2429](https://github.com/rokwire/illinois-app/issues/2429).
12+
13+
## [1.2.3] - 2022-09-28
14+
### Changed
15+
- Show hidden groups only for admins - hide for all others [#163](https://github.com/rokwire/app-flutter-plugin/issues/163).
16+
917
## [1.2.2] - 2022-09-16
1018
### Added
1119
- Search group by name support hidden groups [#2403](https://github.com/rokwire/illinois-app/issues/2403).

SECURITY.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Patches for [ **illinois-app** ] will only be applied to the following versions:
66

77
| Version | Supported |
88
| ------- | ------------------ |
9+
| 1.2.4 | :white_check_mark: |
10+
| 1.2.3 | :white_check_mark: |
911
| 1.2.2 | :white_check_mark: |
1012
| 1.2.0 | :white_check_mark: |
1113
| 1.1.0 | :white_check_mark: |

example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ packages:
638638
path: ".."
639639
relative: true
640640
source: path
641-
version: "1.2.2"
641+
version: "1.2.4"
642642
shared_preferences:
643643
dependency: transitive
644644
description:

lib/model/auth2.dart

+4
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ class Auth2Account {
216216
return linkedTypes;
217217
}
218218

219+
bool get isManagedGroupAdmin {
220+
return hasPermission('managed_group_admin');
221+
}
222+
219223
bool hasRole(String role) => (Auth2StringEntry.findInList(roles, name: role) != null);
220224
bool hasPermission(String premission) => (Auth2StringEntry.findInList(permissions, name: premission) != null);
221225
bool bellongsToGroup(String group) => (Auth2StringEntry.findInList(groups, name: group) != null);

lib/model/group.dart

+7
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ class Group {
227227
return (currentUserIsAdmin == true) && (authManEnabled == true);
228228
}
229229

230+
///
231+
/// Show hidden group only if the user is admin
232+
///
233+
bool get isVisible {
234+
return !(hiddenForSearch ?? false) || currentUserIsAdmin;
235+
}
236+
230237
static List<Group>? listFromJson(List<dynamic>? json) {
231238
List<Group>? values;
232239
if (json != null) {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rokwire_plugin
22
description: Rokwire Flutter plugin
3-
version: 1.2.2
3+
version: 1.2.4
44
homepage:
55

66
environment:

0 commit comments

Comments
 (0)