mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-05 20:54:27 +08:00
Added missing '?' to the canaid permission calls that were missing it.
This commit is contained in:
parent
5bda53eebf
commit
6ba226d514
7 changed files with 10 additions and 10 deletions
|
@ -263,8 +263,8 @@ class ProtocolsController < ApplicationController
|
|||
|
||||
def copy_to_repository
|
||||
link_protocols = params[:link] &&
|
||||
can_manage_protocol_in_module(@protocol) &&
|
||||
can_create_protocols_in_repository(@protocol.team)
|
||||
can_manage_protocol_in_module?(@protocol) &&
|
||||
can_create_protocols_in_repository?(@protocol.team)
|
||||
respond_to do |format|
|
||||
transaction_error = false
|
||||
Protocol.transaction do
|
||||
|
@ -1074,7 +1074,7 @@ class ProtocolsController < ApplicationController
|
|||
@protocol = Protocol.find_by_id(params[:id])
|
||||
render_403 unless @protocol.present? &&
|
||||
can_read_protocol_in_module?(@protocol) &&
|
||||
can_manage_protocol_in_repository(@protocol.parent)
|
||||
can_manage_protocol_in_repository?(@protocol.parent)
|
||||
end
|
||||
|
||||
def check_load_from_repository_views_permissions
|
||||
|
|
|
@ -196,7 +196,7 @@ class ResultAssetsController < ApplicationController
|
|||
|
||||
def check_archive_permissions
|
||||
if result_params[:archived].to_s != '' and
|
||||
not can_archive_result(@result)
|
||||
not can_archive_result?(@result)
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
|
|
@ -201,7 +201,7 @@ class ResultTablesController < ApplicationController
|
|||
|
||||
def check_archive_permissions
|
||||
if result_params[:archived].to_s != '' and
|
||||
not can_archive_result(@result)
|
||||
not can_archive_result?(@result)
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
|
|
@ -207,7 +207,7 @@ class ResultTextsController < ApplicationController
|
|||
|
||||
def check_archive_permissions
|
||||
if result_params[:archived].to_s != '' and
|
||||
not can_archive_result(@result)
|
||||
not can_archive_result?(@result)
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
|
|
@ -609,7 +609,7 @@ class StepsController < ApplicationController
|
|||
end
|
||||
|
||||
def check_view_permissions
|
||||
render_403 unless can_read_protocol_in_module(@protocol) ||
|
||||
render_403 unless can_read_protocol_in_module?(@protocol) ||
|
||||
can_read_protocol_in_repository?(@protocol)
|
||||
end
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-options pull-right">
|
||||
<% if can_edit_result(result) %>
|
||||
<% if can_edit_result?(result) %>
|
||||
<a class="btn btn-link edit-result-button <%= edit_result_button_class(result) %>" id="<%= result.id %>_edit" href="<%= edit_result_link(result) %>" data-remote="true" title="<%= t'my_modules.results.options.edit_title' %>">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
<% end %>
|
||||
<% if can_archive_result(result) && result_unlocked?(result) %>
|
||||
<% if can_archive_result?(result) && result_unlocked?(result) %>
|
||||
<a href="#"
|
||||
class="btn btn-link form-submit-link"
|
||||
data-form-id="result-archive-form-<%= result.id %>"
|
||||
|
|
|
@ -17,7 +17,7 @@ data-project-users-tab-url="<%= url_for project_user_projects_path(project_id: p
|
|||
<li>
|
||||
<%= link_to t("projects.index.edit_option"), edit_project_path(project, format: :json), remote: true, "data-action" => "edit" %>
|
||||
</li>
|
||||
<% if can_archive_project(project) %>
|
||||
<% if can_archive_project?(project) %>
|
||||
<li><a href="#" class="form-submit-link" data-submit-form="<%= project_form.options[:html][:id] %>" data-confirm-form="<%= t("projects.index.archive_confirm") %>"><%= t 'projects.index.archive_option' %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Reference in a new issue