We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit c7dd5959 authored by mattl's avatar mattl

Run onEndSetApiUser also when already logged in!

parent d1ac9a4b
...@@ -93,6 +93,8 @@ class ApiAuthAction extends ApiAction ...@@ -93,6 +93,8 @@ class ApiAuthAction extends ApiAction
// TRANS: Authorization exception thrown when a user without API access tries to access the API. // TRANS: Authorization exception thrown when a user without API access tries to access the API.
throw new AuthorizationException(_('Not allowed to use API.')); throw new AuthorizationException(_('Not allowed to use API.'));
} }
// Let's run this in the same way as if we've just authenticated the user (basic/oauth auth)
Event::handle('EndSetApiUser', array($this->auth_user));
$this->access = self::READ_WRITE; $this->access = self::READ_WRITE;
} else { } else {
$oauthReq = $this->getOAuthRequest(); $oauthReq = $this->getOAuthRequest();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment