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

fix setqouta for subadmins

parent ffc55f35
No related branches found
No related tags found
No related merge requests found
...@@ -8,11 +8,17 @@ ...@@ -8,11 +8,17 @@
// Init owncloud // Init owncloud
require_once('../../lib/base.php'); require_once('../../lib/base.php');
OC_JSON::checkAdminUser(); OC_JSON::checkSubAdminUser();
OCP\JSON::callCheck(); OCP\JSON::callCheck();
$username = isset($_POST["username"])?$_POST["username"]:''; $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 //make sure the quota is in the expected format
$quota=$_POST["quota"]; $quota=$_POST["quota"];
if($quota!='none' and $quota!='default'){ if($quota!='none' and $quota!='default'){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment