Skip to content

Commit

Permalink
[frontend] Refactor involved_users partial by using can_modify? helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Jun 28, 2018
1 parent 9b57983 commit 97c48e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/views/shared/_involved_users.html.haml
@@ -1,4 +1,5 @@
- user_is_maintainer = (@package && User.current.can_modify?(@package)) || (@project && User.current.can_modify?(@project.api_obj))
- object = @package || @project
- user_is_maintainer = User.current.can_modify?(object) if object
- data = { 'save-user' => url_for(action: 'save_person'),
- 'remove' => url_for(action: 'remove_role'),
- 'save-group' => url_for(action: 'save_group'),
Expand Down

0 comments on commit 97c48e2

Please sign in to comment.