search for: authorize_act

Displaying 4 results from an estimated 4 matches for "authorize_act".

2006 Jan 30
2
Modules, controllers and inheritance
...inherit things from base class. I have following setup: app/controllers/ application.rb: class ApplicationController admin/ admin_controller.rb: class Admin::AdminController < ApplicationController include LoginEngine include UserEngine before_filter :authorize_action # method defined by LoginEngine homepage_controller.rb class Admin::HomepageController < Admin::AdminController Now when I try to access HomepageController I get NoMethodError: undefined method `authorize_action'' for #<Admin::HomepageController:0xb77746c0> So it se...
2006 Jun 07
0
Adding ''author'' functionality to UserEngine / RBAC roles
.... At the moment, I allow ''Guest'' to read/view all records, and User additionaly has access to create/edit/destroy, however this means that any registered user is able to modify any record. My first thought was to add another filter in the chain after the UserEngine''s authorize_action. So, I added: prepend_after_filter :author_permission, :except => [:show, ... ] In my author_permission i simply check a conditional: session[:user].id != @object.user_id And based on that output error messages etc. Now, this seems to work when I try to call ''edit'' on...
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...nsition is complete - def tmp_pre_update - pre_edit - end - def tmp_authorize_admin - authorize_admin - end - def pre_create - end - def pre_show - end - - # These authorize_XXX methods should go away once we're fully converted to - # the service layer - def authorize_view - authorize_action(Privilege::VIEW) - end - def authorize_user - authorize_action(Privilege::VM_CONTROL) - end - def authorize_admin - authorize_action(Privilege::MODIFY) - end - def authorize_action(privilege) - authorized!(privilege) - true - end - def handle_perm_error(error) handle_e...
2006 Jan 23
2
UserEngine -- Permission.synchronize_with_controllers -- trouble with my own controller modules
...t I need to do so that it''s aware of controllers in the subdirectories? /app/controllers/application.rb require ''login_engine'' class ApplicationController < ActionController::Base include LoginEngine include UserEngine helper :user model :user before_filter :authorize_action end Example of one of my admin controllers. class Admin::PlayersController < ApplicationController layout "admin_layout" #... methods here (I have several methods defined here, but figured no one really cared to see them all ... end -- James