Commit 038bcafd authored by Markus Koller's avatar Markus Koller

Merge branch 'pat_error' into 'master'

Resolve enforce SSO-Only Authentication for Git Activity is blocking Project Access Token use for APIs

See merge request gitlab-org/gitlab!61348
parents f54f7bab 29922d18
---
title: Fix error caused by enforcing SSO-Only Authentication for Git Activity for PAT tokens
merge_request: 61348
author:
type: fixed
......@@ -51,6 +51,7 @@ module Gitlab
end
def user_allowed?
return true if user.bot?
return true if user.auditor? || user.can_read_all_resources?
return true if group.owned_by?(user)
......
......@@ -150,6 +150,12 @@ RSpec.describe Gitlab::Auth::GroupSaml::SessionEnforcer do
it { is_expected.to be_falsey }
end
context 'with project bot' do
let(:user) { create(:user, :project_bot) }
it { is_expected.to be_falsey }
end
end
end
......
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