Commit 403cb858 authored by mmn's avatar mmn

Less verbose logic for checking api authentication

parent 6f5086fc
......@@ -97,16 +97,12 @@ class ApiAuthAction extends ApiAction
} else {
$oauthReq = $this->getOAuthRequest();
if (!$oauthReq) {
if ($this->requiresAuth()) {
} else {
// Check to see if a basic auth user is there even
// if one's not required
} else {
if ($oauthReq instanceof OAuthRequest) {
} else {
// If not using OAuth, check if there is a basic auth
// and require it if the current action requires it.
// NOTE: Make sure we're scoped properly based on the auths!
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment