mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-10-04 01:20:43 -04:00
Implement permission checks for adding and deleting line items in issue forms
This commit is contained in:
1 parent
0acf5ffca4
commit
9a9efcbaf9
5 files changed
+40
-29
No files matched your search
@@ -45,11 +45,14 @@
|
||||
</template>
|
||||
|
||||
<p>
|
||||
<button type="button"
|
||||
class="icon icon-add"
|
||||
data-nested-form-add>
|
||||
<%= l(:button_add) %>
|
||||
</button>
|
||||
|
||||
<% if User.current.allowed_to?(:add_line_items, nil, global: true) %>
|
||||
<button type="button"
|
||||
class="icon icon-add"
|
||||
data-nested-form-add>
|
||||
<%= l(:button_add) %>
|
||||
</button>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -35,13 +35,15 @@
|
||||
0.00
|
||||
</td>
|
||||
|
||||
<% unless readonly %>
|
||||
<td class="actions">
|
||||
<button type="button"
|
||||
class="icon-only icon-del"
|
||||
title="<%= l(:label_remove) %>"
|
||||
data-nested-form-remove>
|
||||
</button>
|
||||
</td>
|
||||
<% if User.current.allowed_to?(:delete_line_items, nil, global: true) %>
|
||||
<% unless readonly %>
|
||||
<td class="actions">
|
||||
<button type="button"
|
||||
class="icon-only icon-del"
|
||||
title="<%= l(:label_remove) %>"
|
||||
data-nested-form-remove>
|
||||
</button>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
Reference in new issue
Block a user