From 2fc834230a8e5cae4070d0c1f0053e0dc20db1b3 Mon Sep 17 00:00:00 2001 From: Georg Ehrke <dev@georgswebsite.de> Date: Thu, 19 Jul 2012 16:37:41 +0200 Subject: [PATCH] fix setqouta for subadmins --- settings/ajax/setquota.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index 2b412c0f2f..55e936515e 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -8,11 +8,17 @@ // Init owncloud require_once('../../lib/base.php'); -OC_JSON::checkAdminUser(); +OC_JSON::checkSubAdminUser(); OCP\JSON::callCheck(); $username = isset($_POST["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') ))); + exit(); +} + //make sure the quota is in the expected format $quota=$_POST["quota"]; if($quota!='none' and $quota!='default'){ -- GitLab