Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
can_add_reviews
logic to a pundit policy and use in request be…
…ta views This code is for authorization and therefore should be in a pundit policy.
- Loading branch information
1 parent
109a5d5
commit 8217048
Showing
6 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
src/api/app/views/webui/request/beta_show_tabs/_ask_for_review.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
- if can_add_reviews | ||
%button.btn.btn-outline-secondary.btn-sm{ data: { 'bs-toggle': 'modal', 'bs-target': '#add-reviewer-modal' }, title: 'Add Reviewer' } | ||
%i.fas.fa-plus-circle.me-1.text-outline-secondary | ||
%span.nav-item-name Add Reviewer | ||
= render partial: 'add_reviewer_dialog' | ||
%button.btn.btn-outline-secondary.btn-sm{ data: { 'bs-toggle': 'modal', 'bs-target': '#add-reviewer-modal' }, title: 'Add Reviewer' } | ||
%i.fas.fa-plus-circle.me-1.text-outline-secondary | ||
%span.nav-item-name Add Reviewer | ||
= render partial: 'add_reviewer_dialog' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters