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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
ff2713a5
Commit
ff2713a5
authored
Apr 03, 2017
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos in ProtectedRef concern and whitespace detected by rubocop
parent
3c91841d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
5 deletions
+2
-5
app/controllers/projects/protected_branches_controller.rb
app/controllers/projects/protected_branches_controller.rb
+0
-1
app/controllers/projects/protected_tags_controller.rb
app/controllers/projects/protected_tags_controller.rb
+0
-1
app/controllers/projects/settings/repository_controller.rb
app/controllers/projects/settings/repository_controller.rb
+0
-1
app/models/concerns/protected_ref.rb
app/models/concerns/protected_ref.rb
+2
-2
No files found.
app/controllers/projects/protected_branches_controller.rb
View file @
ff2713a5
class
Projects::ProtectedBranchesController
<
Projects
::
ProtectedRefsController
class
Projects::ProtectedBranchesController
<
Projects
::
ProtectedRefsController
protected
protected
def
protected_ref
def
protected_ref
...
...
app/controllers/projects/protected_tags_controller.rb
View file @
ff2713a5
class
Projects::ProtectedTagsController
<
Projects
::
ProtectedRefsController
class
Projects::ProtectedTagsController
<
Projects
::
ProtectedRefsController
protected
protected
def
protected_ref
def
protected_ref
...
...
app/controllers/projects/settings/repository_controller.rb
View file @
ff2713a5
...
@@ -19,7 +19,6 @@ module Projects
...
@@ -19,7 +19,6 @@ module Projects
load_gon_index
load_gon_index
end
end
def
access_levels_options
def
access_levels_options
#TODO: consider protected tags
#TODO: consider protected tags
#TODO: Refactor ProtectedBranch::PushAccessLevel so it doesn't mention branches
#TODO: Refactor ProtectedBranch::PushAccessLevel so it doesn't mention branches
...
...
app/models/concerns/protected_ref.rb
View file @
ff2713a5
...
@@ -9,13 +9,13 @@ module ProtectedRef
...
@@ -9,13 +9,13 @@ module ProtectedRef
delegate
:matching
,
:matches?
,
:wildcard?
,
to: :ref_matcher
delegate
:matching
,
:matches?
,
:wildcard?
,
to: :ref_matcher
def
self
.
matching_refs_accesible_to
(
ref
,
user
,
action: :push
)
def
self
.
matching_refs_accesible_to
(
ref
,
user
,
action: :push
)
access_levels_for_ref
(
ref
,
action
).
any?
do
|
access_level
|
access_levels_for_ref
(
ref
,
action
:
action
).
any?
do
|
access_level
|
access_level
.
check_access
(
user
)
access_level
.
check_access
(
user
)
end
end
end
end
def
self
.
access_levels_for_ref
(
ref
,
action: :push
)
def
self
.
access_levels_for_ref
(
ref
,
action: :push
)
self
.
matching
(
ref
).
map
(
&
:"
@
#{
action
}
_access_levels"
).
flatten
self
.
matching
(
ref
).
map
(
&
:"
#{
action
}
_access_levels"
).
flatten
end
end
def
self
.
matching
(
ref_name
,
protected_refs:
nil
)
def
self
.
matching
(
ref_name
,
protected_refs:
nil
)
...
...
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