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