Merge pull request #11066 from annando/issue-11063

Issue 11063: Fix check for current user
This commit is contained in:
Hypolite Petovan 2021-12-03 23:47:19 -05:00 committed by GitHub
commit ba98242b9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,7 +88,7 @@ class BaseApi extends BaseModule
case Router::PUT:
self::checkAllowedScope(self::SCOPE_WRITE);
if (!$this->app->isLoggedIn()) {
if (!self::getCurrentUserID()) {
throw new HTTPException\ForbiddenException($this->t('Permission denied.'));
}
break;