diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-04-18 11:53:38 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-04-18 11:53:38 +0200 |
commit | a1ff99126a3eacf4570376e1363c3259e1f2d990 (patch) | |
tree | 581df8ae704628f299fd194f0710a4efae2634e5 /lib/group.php | |
parent | dd0eb9dd8dbc0d0eff559775d346b5fe04705554 (diff) | |
download | nextcloud-server-a1ff99126a3eacf4570376e1363c3259e1f2d990.tar.gz nextcloud-server-a1ff99126a3eacf4570376e1363c3259e1f2d990.zip |
prevent users from deleting admin group
Diffstat (limited to 'lib/group.php')
-rw-r--r-- | lib/group.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/group.php b/lib/group.php index eb4aa3bbf28..074e464f581 100644 --- a/lib/group.php +++ b/lib/group.php @@ -129,6 +129,11 @@ class OC_GROUP { * Deletes a group and removes it from the group_user-table */ public static function deleteGroup( $gid ){ + // Prevent users from deleting group admin + if( $gid == "admin" ){ + return false; + } + $run = true; OC_HOOK::emit( "OC_GROUP", "pre_deleteGroup", array( "run" => &$run, "gid" => $gid )); |