Skip to content

Commit

Permalink
[api] fix more borked active_rbac for use with :validate_params
Browse files Browse the repository at this point in the history
  • Loading branch information
mmohring authored and adrianschroeter committed Mar 29, 2012
1 parent 98001e3 commit 7f8c4b7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/api/app/controllers/active_rbac/group_controller.rb
Expand Up @@ -3,6 +3,8 @@ class ActiveRbac::GroupController < ActiveRbac::ComponentController
# The RbacHelper allows us to render +acts_as_tree+ AR elegantly
helper RbacHelper

skip_before_filter :validate_params, :only => [:create, :update]

# Use the configured layout.
layout "rbac.rhtml"

Expand Down
2 changes: 2 additions & 0 deletions src/api/app/controllers/active_rbac/role_controller.rb
Expand Up @@ -2,6 +2,8 @@ class ActiveRbac::RoleController < ActiveRbac::ComponentController
# The RbacHelper allows us to render +acts_as_tree+ AR elegantly
helper RbacHelper

skip_before_filter :validate_params, :only => [:update]

# Use the configured layout.
layout "rbac.rhtml"

Expand Down
2 changes: 1 addition & 1 deletion src/api/app/controllers/active_rbac/user_controller.rb
Expand Up @@ -3,7 +3,7 @@ class ActiveRbac::UserController < ActiveRbac::ComponentController
# The RbacHelper allows us to render +acts_as_tree+ AR elegantly
helper RbacHelper

skip_before_filter :validate_params, :only => [:create]
skip_before_filter :validate_params, :only => [:create, :update, :show]

# Use the configured layout.
#layout "rbac.rhtml"
Expand Down
1 change: 1 addition & 0 deletions src/api/app/controllers/admin_controller.rb
@@ -1,6 +1,7 @@
class AdminController < ApplicationController
layout "rbac"

skip_before_filter :validate_params, :only => [:create_tag, :update_tag, :create_blacklist_tag, :update_blacklist_tag ]
skip_before_filter :extract_user, :only => [:killme, :startme]
before_filter :require_admin, :except => [:killme, :startme]

Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/active_rbac/user/edit.rhtml
Expand Up @@ -3,7 +3,7 @@
<% form_tag :action => 'update', :id => @user do %>
<%= render(:partial => "form") %>
<%= submit_tag "Apply Changes", :name => 'submit[update]' %>
<%= submit_tag "Apply Changes", :name => 'submit' %>
<% end %>
<%= link_to 'Show', :action => 'show', :id => @user %> |
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/active_rbac/user/update.rhtml
Expand Up @@ -2,7 +2,7 @@

<% form_for :user, :url => { :action => :update, :id => @user } do |form| %>
<%= render(:partial => 'form') %>
<%= submit_tag "Apply Changes", :name => 'submit[update]' %>
<%= submit_tag "Apply Changes", :name => 'submit' %>
<% end %>
<%= link_to('Show', :action => 'show', :id => @user) %> |
Expand Down

0 comments on commit 7f8c4b7

Please sign in to comment.