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
c702189b
Commit
c702189b
authored
Jun 21, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Users with master permissions cannot edit the file locks
parent
866ea74d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/helpers/path_locks_helper.rb
app/helpers/path_locks_helper.rb
+2
-2
app/models/ability.rb
app/models/ability.rb
+1
-1
No files found.
app/helpers/path_locks_helper.rb
View file @
c702189b
module
PathLocksHelper
def
can_unlock?
(
path_lock
,
current_user
=
@current_user
)
can?
(
current_user
,
:admin_
locks
,
path_lock
)
||
path_lock
.
user
==
current_user
def
can_unlock?
(
path_lock
,
current_user
=
@current_user
,
project
=
@project
)
can?
(
current_user
,
:admin_
path_locks
,
project
)
||
path_lock
.
user
==
current_user
end
def
license_allows_file_locks?
...
...
app/models/ability.rb
View file @
c702189b
...
...
@@ -301,7 +301,7 @@ class Ability
:admin_pipeline
,
:admin_environment
,
:admin_deployment
,
:admin_locks
:admin_
path_
locks
]
end
...
...
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