Commit 29922d18 authored by Gosia Ksionek's avatar Gosia Ksionek Committed by Markus Koller

Resolve enforce SSO-Only Authentication is blocking PAT use for APIs

Changelog: fixed
parent a19e7b79
---
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