|
|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|