Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4b94a392
Commit
4b94a392
authored
Jun 09, 2020
by
Gosia Ksionek
Committed by
Markus Koller
Jun 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve Admins cannot access projects with IP restriction
parent
dfbba26d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
ee/app/policies/ee/project_policy.rb
ee/app/policies/ee/project_policy.rb
+1
-1
ee/changelogs/unreleased/220409-admins-cannot-access-projects-with-ip-restriction.yml
...409-admins-cannot-access-projects-with-ip-restriction.yml
+5
-0
ee/spec/policies/project_policy_spec.rb
ee/spec/policies/project_policy_spec.rb
+8
-0
No files found.
ee/app/policies/ee/project_policy.rb
View file @
4b94a392
...
...
@@ -368,7 +368,7 @@ module EE
prevent
:owner_access
end
rule
{
ip_enforcement_prevents_access
}.
policy
do
rule
{
ip_enforcement_prevents_access
&
~
admin
}.
policy
do
prevent
:read_project
end
...
...
ee/changelogs/unreleased/220409-admins-cannot-access-projects-with-ip-restriction.yml
0 → 100644
View file @
4b94a392
---
title
:
Allow admins to see project despite of ip restriction set on a group level
merge_request
:
34086
author
:
type
:
fixed
ee/spec/policies/project_policy_spec.rb
View file @
4b94a392
...
...
@@ -427,6 +427,14 @@ RSpec.describe ProjectPolicy do
let
(
:range
)
{
'10.0.0.0/8'
}
it
{
is_expected
.
to
be_disallowed
(
:read_project
)
}
context
'with admin enabled'
,
:enable_admin_mode
do
it
{
is_expected
.
to
be_allowed
(
:read_project
)
}
end
context
'with admin disabled'
do
it
{
is_expected
.
to
be_disallowed
(
:read_project
)
}
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment