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
7c506077
Commit
7c506077
authored
Dec 01, 2021
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use linear version User#groups_with_developer_maintainer_project_access
parent
a9a8dd14
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
27 deletions
+2
-27
app/models/user.rb
app/models/user.rb
+1
-6
config/feature_flags/development/linear_user_groups_with_developer_maintainer_project_access.yml
..._user_groups_with_developer_maintainer_project_access.yml
+0
-8
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-13
No files found.
app/models/user.rb
View file @
7c506077
...
@@ -2168,12 +2168,7 @@ class User < ApplicationRecord
...
@@ -2168,12 +2168,7 @@ class User < ApplicationRecord
project_creation_levels
<<
nil
project_creation_levels
<<
nil
end
end
if
Feature
.
enabled?
(
:linear_user_groups_with_developer_maintainer_project_access
,
self
,
default_enabled: :yaml
)
developer_groups
.
self_and_descendants
.
where
(
project_creation_level:
project_creation_levels
)
developer_groups
.
self_and_descendants
.
where
(
project_creation_level:
project_creation_levels
)
else
developer_groups_hierarchy
=
::
Gitlab
::
ObjectHierarchy
.
new
(
developer_groups
).
base_and_descendants
::
Group
.
where
(
id:
developer_groups_hierarchy
.
select
(
:id
),
project_creation_level:
project_creation_levels
)
end
end
end
def
no_recent_activity?
def
no_recent_activity?
...
...
config/feature_flags/development/linear_user_groups_with_developer_maintainer_project_access.yml
deleted
100644 → 0
View file @
a9a8dd14
---
name
:
linear_user_groups_with_developer_maintainer_project_access
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68851
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/339436
milestone
:
'
14.3'
type
:
development
group
:
group::access
default_enabled
:
false
spec/models/user_spec.rb
View file @
7c506077
...
@@ -6246,19 +6246,7 @@ RSpec.describe User do
...
@@ -6246,19 +6246,7 @@ RSpec.describe User do
subject
{
user
.
send
(
:groups_with_developer_maintainer_project_access
)
}
subject
{
user
.
send
(
:groups_with_developer_maintainer_project_access
)
}
shared_examples
'groups_with_developer_maintainer_project_access examples'
do
specify
{
is_expected
.
to
contain_exactly
(
developer_group2
)
}
specify
{
is_expected
.
to
contain_exactly
(
developer_group2
)
}
end
it_behaves_like
'groups_with_developer_maintainer_project_access examples'
context
'when feature flag :linear_user_groups_with_developer_maintainer_project_access is disabled'
do
before
do
stub_feature_flags
(
linear_user_groups_with_developer_maintainer_project_access:
false
)
end
it_behaves_like
'groups_with_developer_maintainer_project_access examples'
end
end
end
describe
'.get_ids_by_username'
do
describe
'.get_ids_by_username'
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