implemented a way to filter out roles that can't be assigned to permission, and disable permissions that are above the current power level of the user.
This commit is contained in:
@@ -27,7 +27,7 @@ struct RoomRolesAndPermissionsScreen: View {
|
||||
|
||||
private var rolesSection: some View {
|
||||
Section {
|
||||
if context.viewState.ownRole == .creator {
|
||||
if context.viewState.ownPowerLevel.role == .creator {
|
||||
ListRow(label: .default(title: L10n.screenRoomRolesAndPermissionsAdminsAndOwners,
|
||||
icon: \.admin),
|
||||
details: administratorOrOwnersDetails,
|
||||
@@ -53,7 +53,7 @@ struct RoomRolesAndPermissionsScreen: View {
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomRolesAndPermissionsScreen.moderators)
|
||||
|
||||
if context.viewState.ownRole != .creator {
|
||||
if context.viewState.ownPowerLevel.role != .creator {
|
||||
ListRow(label: .default(title: L10n.screenRoomRolesAndPermissionsChangeMyRole,
|
||||
icon: \.edit),
|
||||
kind: .button {
|
||||
|
||||
Reference in New Issue
Block a user