Fix permission bug for executing multiple batch results

This commit is contained in:
Lance Edgar 2017-12-02 18:14:31 -06:00
parent 16eeb501ca
commit 6da013bf6c

View file

@ -3,7 +3,7 @@
<%def name="extra_javascript()"> <%def name="extra_javascript()">
${parent.extra_javascript()} ${parent.extra_javascript()}
% if master.results_executable and request.has_perm('{}.execute_results'.format(permission_prefix)): % if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
<script type="text/javascript"> <script type="text/javascript">
var has_execution_options = ${'true' if master.has_execution_options(batch) else 'false'}; var has_execution_options = ${'true' if master.has_execution_options(batch) else 'false'};
@ -47,14 +47,14 @@
</%def> </%def>
<%def name="grid_tools()"> <%def name="grid_tools()">
% if master.results_executable and request.has_perm('{}.execute_results'.format(permission_prefix)): % if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
<button type="button" id="execute-results-button">Execute Results</button> <button type="button" id="execute-results-button">Execute Results</button>
% endif % endif
</%def> </%def>
${parent.body()} ${parent.body()}
% if master.results_executable and request.has_perm('{}.execute_results'.format(permission_prefix)): % if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
<div id="execution-options-dialog" style="display: none;"> <div id="execution-options-dialog" style="display: none;">
${h.form(url('{}.execute_results'.format(route_prefix)), name='execute-results')} ${h.form(url('{}.execute_results'.format(route_prefix)), name='execute-results')}
${h.csrf_token(request)} ${h.csrf_token(request)}