@@ 749-757 (lines=9) @@ | ||
746 | * @param string $group The name of the group to check |
|
747 | * @return bool Can we remove the group? |
|
748 | */ |
|
749 | private function canRemove( $group ) { |
|
750 | // $this->changeableGroups()['remove'] doesn't work, of course. Thanks, PHP. |
|
751 | $groups = $this->changeableGroups(); |
|
752 | ||
753 | return in_array( |
|
754 | $group, |
|
755 | $groups['remove'] ) || ( $this->isself && in_array( $group, $groups['remove-self'] ) |
|
756 | ); |
|
757 | } |
|
758 | ||
759 | /** |
|
760 | * @param string $group The name of the group to check |
|
@@ 763-770 (lines=8) @@ | ||
760 | * @param string $group The name of the group to check |
|
761 | * @return bool Can we add the group? |
|
762 | */ |
|
763 | private function canAdd( $group ) { |
|
764 | $groups = $this->changeableGroups(); |
|
765 | ||
766 | return in_array( |
|
767 | $group, |
|
768 | $groups['add'] ) || ( $this->isself && in_array( $group, $groups['add-self'] ) |
|
769 | ); |
|
770 | } |
|
771 | ||
772 | /** |
|
773 | * Returns $this->getUser()->changeableGroups() |