summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-09-14 13:41:06 +0000
committerTom Needham <needham.thomas@gmail.com>2012-09-14 13:41:06 +0000
commit0f07226270d02ba7b8b1da8247cdbcb206a6c744 (patch)
tree577b1be16cacb76a8e093111df9f7f175baca103 /lib/api.php
parent0c55ca1d0a04a1c4cae2665458cdb7fd1bc3d80e (diff)
downloadnextcloud-server-0f07226270d02ba7b8b1da8247cdbcb206a6c744.tar.gz
nextcloud-server-0f07226270d02ba7b8b1da8247cdbcb206a6c744.zip
API: Allow admins to access SUBADMIN api methods
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/api.php b/lib/api.php
index 29446e979fe..ba6e880261d 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -131,7 +131,13 @@ class OC_API {
if(!$user){
return false;
} else {
- return OC_SubAdmin::isSubAdmin($user);
+ $subadmin = OC_SubAdmin::isSubAdmin($user);
+ $admin = OC_Group::inGroup($user, 'admin');
+ if($subadmin || $admin){
+ return true;
+ } else {
+ return false;
+ }
}
break;
case OC_API::ADMIN_AUTH:
@@ -236,6 +242,6 @@ class OC_API {
$writer->writeElement($k, $v);
}
}
-
+ }
}