summaryrefslogtreecommitdiffstats
path: root/lib/private/group/group.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/group/group.php')
-rw-r--r--lib/private/group/group.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/group/group.php b/lib/private/group/group.php
index 6111051ea09..5f439e91cde 100644
--- a/lib/private/group/group.php
+++ b/lib/private/group/group.php
@@ -229,6 +229,11 @@ class Group implements IGroup {
* @return bool
*/
public function delete() {
+ // Prevent users from deleting group admin
+ if ($this->getGID() === 'admin') {
+ return false;
+ }
+
$result = false;
if ($this->emitter) {
$this->emitter->emit('\OC\Group', 'preDelete', array($this));