summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-07-19 18:00:33 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-07-19 18:00:33 +0200
commit6cf418f2fae60dd5f7d3dd1cf77977f6faa0dfcb (patch)
treed77d4358748801a8d42063817cc742083945ee7d /settings/ajax
parent05bc541276192c9f1bbe82ea9989872d5f25f49c (diff)
downloadnextcloud-server-6cf418f2fae60dd5f7d3dd1cf77977f6faa0dfcb.tar.gz
nextcloud-server-6cf418f2fae60dd5f7d3dd1cf77977f6faa0dfcb.zip
fix copy&paste fail and deny subadmins to set the default qouta
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/removeuser.php2
-rw-r--r--settings/ajax/setquota.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php
index 1439cfe373a..bfab13a68c8 100644
--- a/settings/ajax/removeuser.php
+++ b/settings/ajax/removeuser.php
@@ -10,7 +10,7 @@ $username = $_POST["username"];
if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)){
$l = OC_L10N::get('core');
- self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
+ OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit();
}
diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php
index 55e936515ec..2a30b1d97e6 100644
--- a/settings/ajax/setquota.php
+++ b/settings/ajax/setquota.php
@@ -13,9 +13,9 @@ OCP\JSON::callCheck();
$username = isset($_POST["username"])?$_POST["username"]:'';
-if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)){
+if(($username == '' && !OC_Group::inGroup(OC_User::getUser(), 'admin')) || (!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username))){
$l = OC_L10N::get('core');
- self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
+ OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit();
}