Merge pull request #216 from pangeachat/only-admin-remove-room-from-space

Only admins can remove a room from a space
This commit is contained in:
ggurdin 2024-05-17 15:54:28 -04:00 committed by GitHub
commit 31c128f329
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -237,6 +237,10 @@ class _SpaceViewState extends State<SpaceView> {
icon: Icons.send_outlined,
),
if (spaceChild != null &&
// #Pangea
room != null &&
room.ownPowerLevel >= ClassDefaultValues.powerLevelOfAdmin &&
// Pangea#
(activeSpace?.canChangeStateEvent(EventTypes.spaceChild) ?? false))
SheetAction(
key: SpaceChildContextAction.removeFromSpace,