Merge pull request #2571 from nextcloud/issue-2568-allow-non-subadmins-to-change-language

Allow non subadmins to change language
This commit is contained in:
Morris Jobke 2016-12-08 17:52:44 +01:00 committed by GitHub
commit 60e4299bcb
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ use OCP\AppFramework\Http;
* @package OC\AppFramework\Middleware\Security\Exceptions
*/
class NotAdminException extends SecurityException {
public function __construct() {
parent::__construct('Logged in user must be an admin', Http::STATUS_FORBIDDEN);
public function __construct($message = 'Logged in user must be an admin') {
parent::__construct($message, Http::STATUS_FORBIDDEN);
}
}

View File

@ -69,6 +69,7 @@ class PersonalController extends Controller {
/**
* @NoAdminRequired
* @NoSubadminRequired
* @param string $lang
* @return JSONResponse
*/