Skip to content
Snippets Groups Projects
Commit 6e139f16 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

add isUserAccessible method to OC_SubAdmin class

parent fb646893
Branches
No related tags found
No related merge requests found
...@@ -122,4 +122,17 @@ class OC_SubAdmin{ ...@@ -122,4 +122,17 @@ class OC_SubAdmin{
} }
return false; return false;
} }
public static function isUserAccessible($subadmin, $user){
if(!self::isSubAdmin($subadmin)){
return false;
}
$accessiblegroups = self::getSubAdminsGroups($subadmin);
foreach($accessiblegroups as $accessiblegroup){
if(OC_Group::inGroup($user, $accessiblegroup)){
return true;
}
}
return false;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment