fix copy&paste fail and deny subadmins to set the default qouta

remotes/origin/stable45
Georg Ehrke 13 years ago
parent 05bc541276
commit 6cf418f2fa
  1. 2
      settings/ajax/removeuser.php
  2. 4
      settings/ajax/setquota.php
  3. 2
      settings/templates/users.php

@ -10,7 +10,7 @@ $username = $_POST["username"];
if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)){ if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)){
$l = OC_L10N::get('core'); $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(); exit();
} }

@ -13,9 +13,9 @@ 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)){ 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'); $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(); exit();
} }

@ -32,7 +32,7 @@ $_['subadmingroups'] = array_flip($items);
<div class="quota"> <div class="quota">
<span><?php echo $l->t('Default Quota');?>:</span> <span><?php echo $l->t('Default Quota');?>:</span>
<div class="quota-select-wrapper"> <div class="quota-select-wrapper">
<select class='quota'> <select class='quota' <?php if(!(is_array($_['subadmins']) || $_['subadmins'])) echo 'disabled="disabled"'; ?>>
<?php foreach($_['quota_preset'] as $preset):?> <?php foreach($_['quota_preset'] as $preset):?>
<?php if($preset!='default'):?> <?php if($preset!='default'):?>
<option <option

Loading…
Cancel
Save