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
d29a3e9d
Commit
d29a3e9d
authored
Jul 10, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix static analysis offences
parent
042afb73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/concerns/ee/protected_ref.rb
app/models/concerns/ee/protected_ref.rb
+1
-1
spec/features/protected_tags_spec.rb
spec/features/protected_tags_spec.rb
+2
-2
No files found.
app/models/concerns/ee/protected_ref.rb
View file @
d29a3e9d
...
...
@@ -11,7 +11,7 @@ module EE
# If we don't `protected_branch` or `protected_tag` would be empty and
# `project` cannot be delegated to it, which in turn would cause validations
# to fail.
has_many
:"
#{
type
}
_access_levels"
,
dependent: :destroy
,
inverse_of:
self
.
model_name
.
singular
has_many
:"
#{
type
}
_access_levels"
,
inverse_of:
self
.
model_name
.
singular
# rubocop:disable Cop/ActiveRecordDependent
accepts_nested_attributes_for
:"
#{
type
}
_access_levels"
,
allow_destroy:
true
...
...
spec/features/protected_tags_spec.rb
View file @
d29a3e9d
...
...
@@ -128,7 +128,7 @@ feature 'Projected Tags', feature: true, js: true do
protected_tag
.
create_access_levels
.
new
(
user:
create
(
:user
,
name:
'Jane'
))
.
save!
(
validate:
false
)
visit
namespace_project_settings_repository_path
(
project
.
namespace
,
project
)
visit
project_settings_repository_path
(
project
)
expect
(
page
).
to
have_content
(
"The following user can also create tags: "
\
"Jane"
)
...
...
@@ -138,7 +138,7 @@ feature 'Projected Tags', feature: true, js: true do
protected_tag
.
create_access_levels
.
new
(
group:
create
(
:group
,
name:
'Team Awesome'
))
.
save!
(
validate:
false
)
visit
namespace_project_settings_repository_path
(
project
.
namespace
,
project
)
visit
project_settings_repository_path
(
project
)
expect
(
page
).
to
have_content
(
"Members of this group can also create tags: "
\
"Team Awesome"
)
...
...
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