Skip to content

Commit 5c5df8e

Browse files
authored
Merge pull request #4765 from owncloud/fix/permission_to_list_members
[FIX] Permission to list members
2 parents c2c66d4 + d3c88ae commit 5c5df8e

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ ownCloud admins and users.
8181
available).
8282

8383
https://github.com/owncloud/android/issues/4612
84+
https://github.com/owncloud/android/issues/4763
8485
https://github.com/owncloud/android/pull/4728
86+
https://github.com/owncloud/android/pull/4765
8587

8688
* Enhancement - Set emoji as space image: [#4707](https://github.com/owncloud/android/issues/4707)
8789

‎changelog/unreleased/4728‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ A new option to view all members of a space has been added to the bottom sheet,
44
This new option opens a new view that shows information like member names, roles, and expiration dates (if available).
55

66
https://github.com/owncloud/android/issues/4612
7+
https://github.com/owncloud/android/issues/4763
78
https://github.com/owncloud/android/pull/4728
9+
https://github.com/owncloud/android/pull/4765

‎owncloudDomain/src/main/java/com/owncloud/android/domain/spaces/usecases/FilterSpaceMenuOptionsUseCase.kt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class FilterSpaceMenuOptionsUseCase(
4545

4646
val editImagePermission = hasSpacePermission(spacePermissionsResult, DRIVES_MANAGE_PERMISSION)
4747

48-
if (spacePermissionsResult is UseCaseResult.Success) {
48+
val membersPermission = hasSpacePermission(spacePermissionsResult, DRIVES_READ_PERMISSION)
49+
50+
if (membersPermission) {
4951
optionsToShow.add(SpaceMenuOption.MEMBERS)
5052
}
5153

@@ -85,6 +87,7 @@ class FilterSpaceMenuOptionsUseCase(
8587
companion object {
8688
private const val DRIVES_MANAGE_PERMISSION = "libre.graph/driveItem/permissions/update"
8789
private const val DRIVES_DELETE_PERMISSION = "libre.graph/driveItem/permissions/delete"
90+
private const val DRIVES_READ_PERMISSION = "libre.graph/driveItem/permissions/read"
8891
private const val DRIVES_MANAGER_ROLE = "manager"
8992
}
9093
}

0 commit comments

Comments
 (0)