Exchanges can only be added if user is admin
This commit is contained in:
parent
6400d69ed7
commit
71800b7a45
1 changed files with 3 additions and 1 deletions
|
|
@ -144,7 +144,9 @@ class AddToSpaceState extends State<AddToSpaceToggles> {
|
|||
|
||||
Widget getAddToSpaceToggleItem(int index) {
|
||||
final Room possibleParent = possibleParents[index];
|
||||
final bool canAdd = possibleParent.canIAddSpaceChild(room);
|
||||
final bool canAdd = !(!possibleParent.isRoomAdmin &&
|
||||
widget.mode == AddToClassMode.exchange) &&
|
||||
possibleParent.canIAddSpaceChild(room);
|
||||
|
||||
return Opacity(
|
||||
opacity: canAdd ? 1 : 0.5,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue