-
- Downloads
Add new policy abilities for path locks
Introduces read_path_locks and create_path_locks to the project policy and destroy_path_lock to the path lock policy. Note: admin_path_locks is defined in the project policy and the path_lock policy. Currently it is exposed in the graph API: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/graphql/ee/types/permission_types/project.rb and also referenced in the path lock helper when checking if a user can unlock a file: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/helpers/path_locks_helper.rb We will retain the project policy ability to retain backwards compatability in the API, however, in a future commit we will remove the path lock policy ability and update the helper to reference destroy_path_lock which is more descriptive. Related to #512677
parent
fb19e0ee
No related branches found
No related tags found
Showing
- ee/app/policies/ee/project_policy.rb 8 additions, 0 deletionsee/app/policies/ee/project_policy.rb
- ee/app/policies/path_lock_policy.rb 3 additions, 2 deletionsee/app/policies/path_lock_policy.rb
- ee/spec/policies/path_lock_policy_spec.rb 31 additions, 14 deletionsee/spec/policies/path_lock_policy_spec.rb
- ee/spec/policies/project_policy_spec.rb 2 additions, 2 deletionsee/spec/policies/project_policy_spec.rb
Please register or sign in to comment