fix for object_auth update
This commit is contained in:
parent
959b6aee12
commit
d480a10661
|
@ -67,13 +67,13 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
end
|
||||
|
||||
def check_permission(var)
|
||||
# binding.pry
|
||||
#app = ModuleApp.first({conditions:{key: params[:module_app_key]}})
|
||||
# setup_vars
|
||||
@module_app.is_manager?(current_user) || current_user.admin?
|
||||
end
|
||||
|
||||
def setup_vars
|
||||
# binding.pry
|
||||
if request.env['HTTP_REFERER'].split('/')[4] == "object_auths"
|
||||
@app_key = params[:app_key]
|
||||
else
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
<%#= label_tag :role, t("admin.roles") %>
|
||||
<div class="clear">
|
||||
<%= content_tag :div do -%>
|
||||
<% form_tag admin_object_auth_ob_auth_path do %>
|
||||
<% form_tag admin_object_auth_ob_auth_url do %>
|
||||
<%= render :partial => "layouts/users_checkbox_ary" %>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= hidden_field_tag 'app_key', @module_app.key %>
|
||||
<%= submit_tag "Update", :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
Reference in New Issue