Commit c702189b authored by Valery Sizov's avatar Valery Sizov

Users with master permissions cannot edit the file locks

parent 866ea74d
module PathLocksHelper module PathLocksHelper
def can_unlock?(path_lock, current_user = @current_user) def can_unlock?(path_lock, current_user = @current_user, project = @project)
can?(current_user, :admin_locks, path_lock) || path_lock.user == current_user can?(current_user, :admin_path_locks, project) || path_lock.user == current_user
end end
def license_allows_file_locks? def license_allows_file_locks?
......
...@@ -301,7 +301,7 @@ class Ability ...@@ -301,7 +301,7 @@ class Ability
:admin_pipeline, :admin_pipeline,
:admin_environment, :admin_environment,
:admin_deployment, :admin_deployment,
:admin_locks :admin_path_locks
] ]
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment