forked from saurabh/orbit4-5
Add authorization for tag and category
This commit is contained in:
parent
49900e9513
commit
c76b65d149
|
@ -153,7 +153,7 @@ class Admin::MembersController < OrbitMemberController
|
|||
end
|
||||
|
||||
if @member.update_attributes(member_profile_params) and @user.save
|
||||
if params[:edit_type]!="edit_privilege" and params[:member_profile][:role_status_ids].nil?
|
||||
if params[:edit_type]!="edit_privilege" and (params[:member_profile].nil? or params[:member_profile][:role_status_ids].nil?)
|
||||
@member.update_attributes(role_status_ids: [])
|
||||
end
|
||||
if !params[:member_profile_field_values].nil?
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<section id="main-wrap">
|
||||
<div class="wrap-inner initial">
|
||||
<div class="row-fluid">
|
||||
<% unless current_user.blank? %>
|
||||
<% if current_user.is_admin? %>
|
||||
<div class="box span7">
|
||||
<div id='server_loading'>
|
||||
<%= render 'server_loading' %>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<% end -%>
|
||||
|
||||
|
||||
<%= form_for @member, :url => admin_member_path(@member), :html => { :multipart => true , :class=>"form-horizontal main-forms", :id=>"user-forms"} do |f| %>
|
||||
<%= form_for @member, :url => admin_member_path(@member), :html => { :multipart => true , :class=>"form-horizontal main-forms", :id=>"user-forms", :style=>"width: 540px; margin: 0 auto;"} do |f| %>
|
||||
|
||||
<fieldset>
|
||||
<div id="basic-area" class="input-area">
|
||||
|
@ -24,7 +24,7 @@
|
|||
<div class="form-actions">
|
||||
<%= link_back('btn') %>
|
||||
<%= hidden_field_tag 'edit_type', 'edit_passwd' %>
|
||||
<%= link_to t(:update_), "#", :class=>"btn btn-primary returnDecide", :onclick=>"$('#edit_user_#{@user.id}').submit()" %>
|
||||
<%= link_to t(:update_), "#", :class=>"btn btn-primary returnDecide", :onclick=>"$('#user-forms').submit()" %>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
head_label_i18n 'module_name.category', icon_class: "icons-flow-cascade"
|
||||
head_link_path "admin_categories_path"
|
||||
active_for_controllers (['admin/categories'])
|
||||
|
||||
# available_for [:admin, :manager]
|
||||
|
||||
# context_link 'all',
|
||||
# link_path: "admin_categorys_path",
|
||||
# priority: 1,
|
||||
# active_for_action: {categorys: :index},
|
||||
# available_for: [:admin, :manager]
|
||||
|
||||
available_for "admin"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
head_label_i18n 'tags', icon_class: "icons-tag"
|
||||
head_link_path "admin_tags_path"
|
||||
active_for_controllers (['admin/tags'])
|
||||
|
||||
# available_for [:admin, :manager]
|
||||
|
||||
# context_link 'all',
|
||||
# link_path: "admin_tags_path",
|
||||
# priority: 1,
|
||||
# active_for_action: {tags: :index},
|
||||
# available_for: [:admin, :manager]
|
||||
|
||||
available_for "admin"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue