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
1cc2b765
Commit
1cc2b765
authored
Mar 16, 2020
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to deprecated Master role
Remove method and constant aliasing
parent
27ad9c73
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
31 additions
and
59 deletions
+31
-59
app/models/concerns/protected_ref_access.rb
app/models/concerns/protected_ref_access.rb
+0
-1
app/models/concerns/select_for_project_authorization.rb
app/models/concerns/select_for_project_authorization.rb
+0
-3
app/models/group.rb
app/models/group.rb
+0
-6
app/models/member.rb
app/models/member.rb
+1
-3
app/models/project.rb
app/models/project.rb
+0
-1
app/models/project_group_link.rb
app/models/project_group_link.rb
+0
-1
app/models/project_team.rb
app/models/project_team.rb
+0
-9
app/models/user.rb
app/models/user.rb
+0
-3
ee/spec/features/projects/package_files_spec.rb
ee/spec/features/projects/package_files_spec.rb
+1
-1
ee/spec/features/projects/packages_spec.rb
ee/spec/features/projects/packages_spec.rb
+1
-1
ee/spec/models/burndown_spec.rb
ee/spec/models/burndown_spec.rb
+2
-2
ee/spec/models/ee/protected_branch_spec.rb
ee/spec/models/ee/protected_branch_spec.rb
+11
-11
ee/spec/serializers/prometheus_alert_entity_spec.rb
ee/spec/serializers/prometheus_alert_entity_spec.rb
+1
-1
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
+1
-1
ee/spec/services/epics/close_service_spec.rb
ee/spec/services/epics/close_service_spec.rb
+2
-2
ee/spec/services/epics/reopen_service_spec.rb
ee/spec/services/epics/reopen_service_spec.rb
+2
-2
ee/spec/services/epics/update_service_spec.rb
ee/spec/services/epics/update_service_spec.rb
+1
-1
ee/spec/services/groups/autocomplete_service_spec.rb
ee/spec/services/groups/autocomplete_service_spec.rb
+1
-1
lib/gitlab/access.rb
lib/gitlab/access.rb
+0
-2
spec/finders/group_descendants_finder_spec.rb
spec/finders/group_descendants_finder_spec.rb
+1
-1
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+1
-1
spec/requests/api/pages/internal_access_spec.rb
spec/requests/api/pages/internal_access_spec.rb
+1
-1
spec/requests/api/pages/private_access_spec.rb
spec/requests/api/pages/private_access_spec.rb
+1
-1
spec/requests/api/pages/public_access_spec.rb
spec/requests/api/pages/public_access_spec.rb
+1
-1
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+1
-1
spec/views/projects/artifacts/_artifact.html.haml_spec.rb
spec/views/projects/artifacts/_artifact.html.haml_spec.rb
+1
-1
No files found.
app/models/concerns/protected_ref_access.rb
View file @
1cc2b765
...
@@ -19,7 +19,6 @@ module ProtectedRefAccess
...
@@ -19,7 +19,6 @@ module ProtectedRefAccess
end
end
included
do
included
do
scope
:master
,
->
{
maintainer
}
# @deprecated
scope
:maintainer
,
->
{
where
(
access_level:
Gitlab
::
Access
::
MAINTAINER
)
}
scope
:maintainer
,
->
{
where
(
access_level:
Gitlab
::
Access
::
MAINTAINER
)
}
scope
:developer
,
->
{
where
(
access_level:
Gitlab
::
Access
::
DEVELOPER
)
}
scope
:developer
,
->
{
where
(
access_level:
Gitlab
::
Access
::
DEVELOPER
)
}
scope
:by_user
,
->
(
user
)
{
where
(
user_id:
user
)
}
scope
:by_user
,
->
(
user
)
{
where
(
user_id:
user
)
}
...
...
app/models/concerns/select_for_project_authorization.rb
View file @
1cc2b765
...
@@ -11,8 +11,5 @@ module SelectForProjectAuthorization
...
@@ -11,8 +11,5 @@ module SelectForProjectAuthorization
def
select_as_maintainer_for_project_authorization
def
select_as_maintainer_for_project_authorization
select
([
"projects.id AS project_id"
,
"
#{
Gitlab
::
Access
::
MAINTAINER
}
AS access_level"
])
select
([
"projects.id AS project_id"
,
"
#{
Gitlab
::
Access
::
MAINTAINER
}
AS access_level"
])
end
end
# @deprecated
alias_method
:select_as_master_for_project_authorization
,
:select_as_maintainer_for_project_authorization
end
end
end
end
app/models/group.rb
View file @
1cc2b765
...
@@ -245,9 +245,6 @@ class Group < Namespace
...
@@ -245,9 +245,6 @@ class Group < Namespace
add_user
(
user
,
:maintainer
,
current_user:
current_user
)
add_user
(
user
,
:maintainer
,
current_user:
current_user
)
end
end
# @deprecated
alias_method
:add_master
,
:add_maintainer
def
add_owner
(
user
,
current_user
=
nil
)
def
add_owner
(
user
,
current_user
=
nil
)
add_user
(
user
,
:owner
,
current_user:
current_user
)
add_user
(
user
,
:owner
,
current_user:
current_user
)
end
end
...
@@ -274,9 +271,6 @@ class Group < Namespace
...
@@ -274,9 +271,6 @@ class Group < Namespace
::
ContainerRepository
.
for_group_and_its_subgroups
(
self
).
exists?
::
ContainerRepository
.
for_group_and_its_subgroups
(
self
).
exists?
end
end
# @deprecated
alias_method
:has_master?
,
:has_maintainer?
# Check if user is a last owner of the group.
# Check if user is a last owner of the group.
def
last_owner?
(
user
)
def
last_owner?
(
user
)
has_owner?
(
user
)
&&
members_with_parents
.
owners
.
size
==
1
has_owner?
(
user
)
&&
members_with_parents
.
owners
.
size
==
1
...
...
app/models/member.rb
View file @
1cc2b765
...
@@ -76,10 +76,8 @@ class Member < ApplicationRecord
...
@@ -76,10 +76,8 @@ class Member < ApplicationRecord
scope
:developers
,
->
{
active
.
where
(
access_level:
DEVELOPER
)
}
scope
:developers
,
->
{
active
.
where
(
access_level:
DEVELOPER
)
}
scope
:maintainers
,
->
{
active
.
where
(
access_level:
MAINTAINER
)
}
scope
:maintainers
,
->
{
active
.
where
(
access_level:
MAINTAINER
)
}
scope
:non_guests
,
->
{
where
(
'members.access_level > ?'
,
GUEST
)
}
scope
:non_guests
,
->
{
where
(
'members.access_level > ?'
,
GUEST
)
}
scope
:masters
,
->
{
maintainers
}
# @deprecated
scope
:owners
,
->
{
active
.
where
(
access_level:
OWNER
)
}
scope
:owners
,
->
{
active
.
where
(
access_level:
OWNER
)
}
scope
:owners_and_maintainers
,
->
{
active
.
where
(
access_level:
[
OWNER
,
MAINTAINER
])
}
scope
:owners_and_maintainers
,
->
{
active
.
where
(
access_level:
[
OWNER
,
MAINTAINER
])
}
scope
:owners_and_masters
,
->
{
owners_and_maintainers
}
# @deprecated
scope
:with_user
,
->
(
user
)
{
where
(
user:
user
)
}
scope
:with_user
,
->
(
user
)
{
where
(
user:
user
)
}
scope
:with_source_id
,
->
(
source_id
)
{
where
(
source_id:
source_id
)
}
scope
:with_source_id
,
->
(
source_id
)
{
where
(
source_id:
source_id
)
}
...
...
app/models/project.rb
View file @
1cc2b765
...
@@ -349,7 +349,6 @@ class Project < ApplicationRecord
...
@@ -349,7 +349,6 @@ class Project < ApplicationRecord
delegate
:members
,
to: :team
,
prefix:
true
delegate
:members
,
to: :team
,
prefix:
true
delegate
:add_user
,
:add_users
,
to: :team
delegate
:add_user
,
:add_users
,
to: :team
delegate
:add_guest
,
:add_reporter
,
:add_developer
,
:add_maintainer
,
:add_role
,
to: :team
delegate
:add_guest
,
:add_reporter
,
:add_developer
,
:add_maintainer
,
:add_role
,
to: :team
delegate
:add_master
,
to: :team
# @deprecated
delegate
:group_runners_enabled
,
:group_runners_enabled
=
,
:group_runners_enabled?
,
to: :ci_cd_settings
delegate
:group_runners_enabled
,
:group_runners_enabled
=
,
:group_runners_enabled?
,
to: :ci_cd_settings
delegate
:root_ancestor
,
to: :namespace
,
allow_nil:
true
delegate
:root_ancestor
,
to: :namespace
,
allow_nil:
true
delegate
:last_pipeline
,
to: :commit
,
allow_nil:
true
delegate
:last_pipeline
,
to: :commit
,
allow_nil:
true
...
...
app/models/project_group_link.rb
View file @
1cc2b765
...
@@ -7,7 +7,6 @@ class ProjectGroupLink < ApplicationRecord
...
@@ -7,7 +7,6 @@ class ProjectGroupLink < ApplicationRecord
REPORTER
=
20
REPORTER
=
20
DEVELOPER
=
30
DEVELOPER
=
30
MAINTAINER
=
40
MAINTAINER
=
40
MASTER
=
MAINTAINER
# @deprecated
belongs_to
:project
belongs_to
:project
belongs_to
:group
belongs_to
:group
...
...
app/models/project_team.rb
View file @
1cc2b765
...
@@ -25,9 +25,6 @@ class ProjectTeam
...
@@ -25,9 +25,6 @@ class ProjectTeam
add_user
(
user
,
:maintainer
,
current_user:
current_user
)
add_user
(
user
,
:maintainer
,
current_user:
current_user
)
end
end
# @deprecated
alias_method
:add_master
,
:add_maintainer
def
add_role
(
user
,
role
,
current_user:
nil
)
def
add_role
(
user
,
role
,
current_user:
nil
)
public_send
(
:"add_
#{
role
}
"
,
user
,
current_user:
current_user
)
# rubocop:disable GitlabSecurity/PublicSend
public_send
(
:"add_
#{
role
}
"
,
user
,
current_user:
current_user
)
# rubocop:disable GitlabSecurity/PublicSend
end
end
...
@@ -98,9 +95,6 @@ class ProjectTeam
...
@@ -98,9 +95,6 @@ class ProjectTeam
@maintainers
||=
fetch_members
(
Gitlab
::
Access
::
MAINTAINER
)
@maintainers
||=
fetch_members
(
Gitlab
::
Access
::
MAINTAINER
)
end
end
# @deprecated
alias_method
:masters
,
:maintainers
def
owners
def
owners
@owners
||=
@owners
||=
if
group
if
group
...
@@ -156,9 +150,6 @@ class ProjectTeam
...
@@ -156,9 +150,6 @@ class ProjectTeam
max_member_access
(
user
.
id
)
==
Gitlab
::
Access
::
MAINTAINER
max_member_access
(
user
.
id
)
==
Gitlab
::
Access
::
MAINTAINER
end
end
# @deprecated
alias_method
:master?
,
:maintainer?
# Checks if `user` is authorized for this project, with at least the
# Checks if `user` is authorized for this project, with at least the
# `min_access_level` (if given).
# `min_access_level` (if given).
def
member?
(
user
,
min_access_level
=
Gitlab
::
Access
::
GUEST
)
def
member?
(
user
,
min_access_level
=
Gitlab
::
Access
::
GUEST
)
...
...
app/models/user.rb
View file @
1cc2b765
...
@@ -1693,9 +1693,6 @@ class User < ApplicationRecord
...
@@ -1693,9 +1693,6 @@ class User < ApplicationRecord
end
end
end
end
# @deprecated
alias_method
:owned_or_masters_groups
,
:owned_or_maintainers_groups
protected
protected
# override, from Devise::Validatable
# override, from Devise::Validatable
...
...
ee/spec/features/projects/package_files_spec.rb
View file @
1cc2b765
...
@@ -15,7 +15,7 @@ describe 'PackageFiles' do
...
@@ -15,7 +15,7 @@ describe 'PackageFiles' do
context
'user with master role'
do
context
'user with master role'
do
before
do
before
do
project
.
add_ma
st
er
(
user
)
project
.
add_ma
intain
er
(
user
)
end
end
it
'allows direct download by url'
do
it
'allows direct download by url'
do
...
...
ee/spec/features/projects/packages_spec.rb
View file @
1cc2b765
...
@@ -8,7 +8,7 @@ describe 'Packages' do
...
@@ -8,7 +8,7 @@ describe 'Packages' do
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
project
.
add_ma
st
er
(
user
)
project
.
add_ma
intain
er
(
user
)
stub_licensed_features
(
packages:
true
)
stub_licensed_features
(
packages:
true
)
end
end
...
...
ee/spec/models/burndown_spec.rb
View file @
1cc2b765
...
@@ -83,7 +83,7 @@ describe Burndown do
...
@@ -83,7 +83,7 @@ describe Burndown do
new_milestone
=
create
(
:milestone
)
new_milestone
=
create
(
:milestone
)
burndown
=
described_class
.
new
(
new_milestone
.
issues_visible_to_user
(
user
),
new_milestone
.
start_date
,
new_milestone
.
due_date
)
burndown
=
described_class
.
new
(
new_milestone
.
issues_visible_to_user
(
user
),
new_milestone
.
start_date
,
new_milestone
.
due_date
)
new_milestone
.
project
.
add_ma
st
er
(
user
)
new_milestone
.
project
.
add_ma
intain
er
(
user
)
expect
(
burndown
).
to
be_accurate
expect
(
burndown
).
to
be_accurate
end
end
...
@@ -237,7 +237,7 @@ describe Burndown do
...
@@ -237,7 +237,7 @@ describe Burndown do
end
end
def
build_sample
(
milestone
,
issue_params
)
def
build_sample
(
milestone
,
issue_params
)
project
.
add_ma
st
er
(
user
)
project
.
add_ma
intain
er
(
user
)
issues
=
[]
issues
=
[]
confidential_issues
=
[]
confidential_issues
=
[]
...
...
ee/spec/models/ee/protected_branch_spec.rb
View file @
1cc2b765
...
@@ -19,13 +19,13 @@ describe ProtectedBranch do
...
@@ -19,13 +19,13 @@ describe ProtectedBranch do
first_protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
first_protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
second_protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
second_protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
first_protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
first_protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
second_protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
second_protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
expect
(
first_protected_branch
).
to
be_valid
expect
(
first_protected_branch
).
to
be_valid
expect
(
second_protected_branch
).
to
be_valid
expect
(
second_protected_branch
).
to
be_valid
first_protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
first_protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
expect
(
first_protected_branch
).
to
be_invalid
expect
(
first_protected_branch
).
to
be_invalid
expect
(
first_protected_branch
.
errors
.
full_messages
.
first
).
to
match
(
"access level has already been taken"
)
expect
(
first_protected_branch
.
errors
.
full_messages
.
first
).
to
match
(
"access level has already been taken"
)
end
end
...
@@ -34,8 +34,8 @@ describe ProtectedBranch do
...
@@ -34,8 +34,8 @@ describe ProtectedBranch do
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
.
project
.
add_developer
(
user
)
protected_branch
.
project
.
add_developer
(
user
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
user:
user
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
user:
user
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
expect
(
protected_branch
).
to
be_valid
expect
(
protected_branch
).
to
be_valid
end
end
...
@@ -45,8 +45,8 @@ describe ProtectedBranch do
...
@@ -45,8 +45,8 @@ describe ProtectedBranch do
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
.
project
.
project_group_links
.
create
(
group:
group
)
protected_branch
.
project
.
project_group_links
.
create
(
group:
group
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
group:
group
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
group:
group
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
expect
(
protected_branch
).
to
be_valid
expect
(
protected_branch
).
to
be_valid
end
end
...
@@ -75,8 +75,8 @@ describe ProtectedBranch do
...
@@ -75,8 +75,8 @@ describe ProtectedBranch do
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
.
project
.
add_developer
(
user
)
protected_branch
.
project
.
add_developer
(
user
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
user:
user
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
user:
user
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
expect
(
protected_branch
).
to
be_valid
expect
(
protected_branch
).
to
be_valid
end
end
...
@@ -107,8 +107,8 @@ describe ProtectedBranch do
...
@@ -107,8 +107,8 @@ describe ProtectedBranch do
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
=
create
(
:protected_branch
,
default_access_level:
false
)
protected_branch
.
project
.
project_group_links
.
create
(
group:
group
)
protected_branch
.
project
.
project_group_links
.
create
(
group:
group
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
group:
group
,
access_level:
Gitlab
::
Access
::
MA
ST
ER
)
protected_branch
.
send
(
association_name
)
<<
build
(
factory_name
,
group:
group
,
access_level:
Gitlab
::
Access
::
MA
INTAIN
ER
)
expect
(
protected_branch
).
to
be_valid
expect
(
protected_branch
).
to
be_valid
end
end
...
...
ee/spec/serializers/prometheus_alert_entity_spec.rb
View file @
1cc2b765
...
@@ -12,7 +12,7 @@ describe PrometheusAlertEntity do
...
@@ -12,7 +12,7 @@ describe PrometheusAlertEntity do
context
'when user can read prometheus alerts'
do
context
'when user can read prometheus alerts'
do
before
do
before
do
prometheus_alert
.
project
.
add_ma
st
er
(
user
)
prometheus_alert
.
project
.
add_ma
intain
er
(
user
)
stub_licensed_features
(
prometheus_alerts:
true
)
stub_licensed_features
(
prometheus_alerts:
true
)
end
end
...
...
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
View file @
1cc2b765
...
@@ -79,7 +79,7 @@ describe MergeRequests::RefreshService do
...
@@ -79,7 +79,7 @@ describe MergeRequests::RefreshService do
allow
(
service
).
to
receive
(
:todo_service
).
and_return
(
todo_service
)
allow
(
service
).
to
receive
(
:todo_service
).
and_return
(
todo_service
)
allow
(
service
).
to
receive
(
:notification_service
).
and_return
(
notification_service
)
allow
(
service
).
to
receive
(
:notification_service
).
and_return
(
notification_service
)
group
.
add_ma
st
er
(
fork_user
)
group
.
add_ma
intain
er
(
fork_user
)
merge_request
merge_request
another_merge_request
another_merge_request
...
...
ee/spec/services/epics/close_service_spec.rb
View file @
1cc2b765
...
@@ -11,7 +11,7 @@ describe Epics::CloseService do
...
@@ -11,7 +11,7 @@ describe Epics::CloseService do
context
'when epics are disabled'
do
context
'when epics are disabled'
do
before
do
before
do
group
.
add_ma
st
er
(
user
)
group
.
add_ma
intain
er
(
user
)
end
end
it
'does not close the epic'
do
it
'does not close the epic'
do
...
@@ -26,7 +26,7 @@ describe Epics::CloseService do
...
@@ -26,7 +26,7 @@ describe Epics::CloseService do
context
'when a user has permissions to update the epic'
do
context
'when a user has permissions to update the epic'
do
before
do
before
do
group
.
add_ma
st
er
(
user
)
group
.
add_ma
intain
er
(
user
)
end
end
context
'when closing an opened epic'
do
context
'when closing an opened epic'
do
...
...
ee/spec/services/epics/reopen_service_spec.rb
View file @
1cc2b765
...
@@ -11,7 +11,7 @@ describe Epics::ReopenService do
...
@@ -11,7 +11,7 @@ describe Epics::ReopenService do
context
'when epics are disabled'
do
context
'when epics are disabled'
do
before
do
before
do
group
.
add_ma
st
er
(
user
)
group
.
add_ma
intain
er
(
user
)
end
end
it
'does not reopen the epic'
do
it
'does not reopen the epic'
do
...
@@ -26,7 +26,7 @@ describe Epics::ReopenService do
...
@@ -26,7 +26,7 @@ describe Epics::ReopenService do
context
'when a user has permissions to update the epic'
do
context
'when a user has permissions to update the epic'
do
before
do
before
do
group
.
add_ma
st
er
(
user
)
group
.
add_ma
intain
er
(
user
)
end
end
context
'when reopening a closed epic'
do
context
'when reopening a closed epic'
do
...
...
ee/spec/services/epics/update_service_spec.rb
View file @
1cc2b765
...
@@ -10,7 +10,7 @@ describe Epics::UpdateService do
...
@@ -10,7 +10,7 @@ describe Epics::UpdateService do
describe
'#execute'
do
describe
'#execute'
do
before
do
before
do
stub_licensed_features
(
epics:
true
)
stub_licensed_features
(
epics:
true
)
group
.
add_ma
st
er
(
user
)
group
.
add_ma
intain
er
(
user
)
end
end
def
find_note
(
starting_with
)
def
find_note
(
starting_with
)
...
...
ee/spec/services/groups/autocomplete_service_spec.rb
View file @
1cc2b765
...
@@ -137,7 +137,7 @@ describe Groups::AutocompleteService do
...
@@ -137,7 +137,7 @@ describe Groups::AutocompleteService do
let!
(
:subgroup_milestone
)
{
create
(
:milestone
,
group:
sub_group
)
}
let!
(
:subgroup_milestone
)
{
create
(
:milestone
,
group:
sub_group
)
}
before
do
before
do
sub_group
.
add_ma
st
er
(
user
)
sub_group
.
add_ma
intain
er
(
user
)
end
end
context
'when group is public'
do
context
'when group is public'
do
...
...
lib/gitlab/access.rb
View file @
1cc2b765
...
@@ -14,8 +14,6 @@ module Gitlab
...
@@ -14,8 +14,6 @@ module Gitlab
REPORTER
=
20
REPORTER
=
20
DEVELOPER
=
30
DEVELOPER
=
30
MAINTAINER
=
40
MAINTAINER
=
40
# @deprecated
MASTER
=
MAINTAINER
OWNER
=
50
OWNER
=
50
# Branch protection settings
# Branch protection settings
...
...
spec/finders/group_descendants_finder_spec.rb
View file @
1cc2b765
...
@@ -123,7 +123,7 @@ describe GroupDescendantsFinder do
...
@@ -123,7 +123,7 @@ describe GroupDescendantsFinder do
project
=
create
(
:project
,
namespace:
group
)
project
=
create
(
:project
,
namespace:
group
)
other_project
=
create
(
:project
)
other_project
=
create
(
:project
)
other_project
.
project_group_links
.
create
(
group:
group
,
other_project
.
project_group_links
.
create
(
group:
group
,
group_access:
ProjectGroupLink
::
MA
ST
ER
)
group_access:
ProjectGroupLink
::
MA
INTAIN
ER
)
expect
(
finder
.
execute
).
to
contain_exactly
(
project
)
expect
(
finder
.
execute
).
to
contain_exactly
(
project
)
end
end
...
...
spec/requests/api/groups_spec.rb
View file @
1cc2b765
...
@@ -302,7 +302,7 @@ describe API::Groups do
...
@@ -302,7 +302,7 @@ describe API::Groups do
before
do
before
do
group1
.
add_developer
(
user2
)
group1
.
add_developer
(
user2
)
group3
.
add_ma
st
er
(
user2
)
group3
.
add_ma
intain
er
(
user2
)
end
end
it
'returns an array of groups the user has at least master access'
do
it
'returns an array of groups the user has at least master access'
do
...
...
spec/requests/api/pages/internal_access_spec.rb
View file @
1cc2b765
...
@@ -19,7 +19,7 @@ describe "Internal Project Pages Access" do
...
@@ -19,7 +19,7 @@ describe "Internal Project Pages Access" do
before
do
before
do
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:access_control
).
and_return
(
true
)
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:access_control
).
and_return
(
true
)
group
.
add_owner
(
owner
)
group
.
add_owner
(
owner
)
project
.
add_ma
st
er
(
master
)
project
.
add_ma
intain
er
(
master
)
project
.
add_developer
(
developer
)
project
.
add_developer
(
developer
)
project
.
add_reporter
(
reporter
)
project
.
add_reporter
(
reporter
)
project
.
add_guest
(
guest
)
project
.
add_guest
(
guest
)
...
...
spec/requests/api/pages/private_access_spec.rb
View file @
1cc2b765
...
@@ -19,7 +19,7 @@ describe "Private Project Pages Access" do
...
@@ -19,7 +19,7 @@ describe "Private Project Pages Access" do
before
do
before
do
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:access_control
).
and_return
(
true
)
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:access_control
).
and_return
(
true
)
group
.
add_owner
(
owner
)
group
.
add_owner
(
owner
)
project
.
add_ma
st
er
(
master
)
project
.
add_ma
intain
er
(
master
)
project
.
add_developer
(
developer
)
project
.
add_developer
(
developer
)
project
.
add_reporter
(
reporter
)
project
.
add_reporter
(
reporter
)
project
.
add_guest
(
guest
)
project
.
add_guest
(
guest
)
...
...
spec/requests/api/pages/public_access_spec.rb
View file @
1cc2b765
...
@@ -19,7 +19,7 @@ describe "Public Project Pages Access" do
...
@@ -19,7 +19,7 @@ describe "Public Project Pages Access" do
before
do
before
do
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:access_control
).
and_return
(
true
)
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:access_control
).
and_return
(
true
)
group
.
add_owner
(
owner
)
group
.
add_owner
(
owner
)
project
.
add_ma
st
er
(
master
)
project
.
add_ma
intain
er
(
master
)
project
.
add_developer
(
developer
)
project
.
add_developer
(
developer
)
project
.
add_reporter
(
reporter
)
project
.
add_reporter
(
reporter
)
project
.
add_guest
(
guest
)
project
.
add_guest
(
guest
)
...
...
spec/services/notification_service_spec.rb
View file @
1cc2b765
...
@@ -2790,7 +2790,7 @@ describe NotificationService, :mailer do
...
@@ -2790,7 +2790,7 @@ describe NotificationService, :mailer do
let!
(
:developer
)
{
create
(
:user
)
}
let!
(
:developer
)
{
create
(
:user
)
}
before
do
before
do
project
.
add_ma
st
er
(
master
)
project
.
add_ma
intain
er
(
master
)
end
end
it
'sends the email to owners and masters'
do
it
'sends the email to owners and masters'
do
...
...
spec/views/projects/artifacts/_artifact.html.haml_spec.rb
View file @
1cc2b765
...
@@ -38,7 +38,7 @@ RSpec.describe "projects/artifacts/_artifact.html.haml" do
...
@@ -38,7 +38,7 @@ RSpec.describe "projects/artifacts/_artifact.html.haml" do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
it
'has a delete button'
do
it
'has a delete button'
do
allow_any_instance_of
(
ProjectTeam
).
to
receive
(
:max_member_access
).
and_return
(
Gitlab
::
Access
::
MA
ST
ER
)
allow_any_instance_of
(
ProjectTeam
).
to
receive
(
:max_member_access
).
and_return
(
Gitlab
::
Access
::
MA
INTAIN
ER
)
render_partial
render_partial
expect
(
rendered
).
to
have_link
(
'Delete artifacts'
,
href:
project_artifact_path
(
project
,
project
.
job_artifacts
.
first
))
expect
(
rendered
).
to
have_link
(
'Delete artifacts'
,
href:
project_artifact_path
(
project
,
project
.
job_artifacts
.
first
))
...
...
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