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
8c55c6eb
Commit
8c55c6eb
authored
Mar 04, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
1aa8f3f4
1d17649c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
30 deletions
+8
-30
app/models/user.rb
app/models/user.rb
+1
-5
changelogs/unreleased/alexpooley-remove_shared_group_membership_auth_ff.yml
...sed/alexpooley-remove_shared_group_membership_auth_ff.yml
+5
-0
config/feature_flags/development/shared_group_membership_auth.yml
...eature_flags/development/shared_group_membership_auth.yml
+0
-8
spec/models/user_spec.rb
spec/models/user_spec.rb
+2
-17
No files found.
app/models/user.rb
View file @
8c55c6eb
...
@@ -940,11 +940,7 @@ class User < ApplicationRecord
...
@@ -940,11 +940,7 @@ class User < ApplicationRecord
# Returns the groups a user has access to, either through a membership or a project authorization
# Returns the groups a user has access to, either through a membership or a project authorization
def
authorized_groups
def
authorized_groups
Group
.
unscoped
do
Group
.
unscoped
do
if
Feature
.
enabled?
(
:shared_group_membership_auth
,
self
)
authorized_groups_with_shared_membership
authorized_groups_with_shared_membership
else
authorized_groups_without_shared_membership
end
end
end
end
end
...
...
changelogs/unreleased/alexpooley-remove_shared_group_membership_auth_ff.yml
0 → 100644
View file @
8c55c6eb
---
title
:
Include shared with groups in list of authorized groups
merge_request
:
54894
author
:
type
:
fixed
config/feature_flags/development/shared_group_membership_auth.yml
deleted
100644 → 0
View file @
1aa8f3f4
---
name
:
shared_group_membership_auth
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46412
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/224771
milestone
:
'
13.6'
type
:
development
group
:
group::access
default_enabled
:
false
spec/models/user_spec.rb
View file @
8c55c6eb
...
@@ -3266,24 +3266,9 @@ RSpec.describe User do
...
@@ -3266,24 +3266,9 @@ RSpec.describe User do
create
(
:group_group_link
,
shared_group:
private_group
,
shared_with_group:
other_group
)
create
(
:group_group_link
,
shared_group:
private_group
,
shared_with_group:
other_group
)
end
end
context
'when shared_group_membership_auth is enabled'
do
before
do
stub_feature_flags
(
shared_group_membership_auth:
user
)
end
it
{
is_expected
.
to
include
shared_group
}
it
{
is_expected
.
to
include
shared_group
}
it
{
is_expected
.
not_to
include
other_group
}
it
{
is_expected
.
not_to
include
other_group
}
end
end
context
'when shared_group_membership_auth is disabled'
do
before
do
stub_feature_flags
(
shared_group_membership_auth:
false
)
end
it
{
is_expected
.
not_to
include
shared_group
}
it
{
is_expected
.
not_to
include
other_group
}
end
end
end
end
describe
'#membership_groups'
do
describe
'#membership_groups'
do
...
...
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