diff options
-rw-r--r-- | lib/subadmin.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/subadmin.php b/lib/subadmin.php index b6f0b3007fd..330876536d7 100644 --- a/lib/subadmin.php +++ b/lib/subadmin.php @@ -122,4 +122,17 @@ class OC_SubAdmin{ } 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; + } } |