Displaying 5 results from an estimated 5 matches for "authorize_admin".
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...ActionController::Base
init_gettext "ovirt"
layout :choose_layout
- # FIXME: once service layer is complete, the following before_filters will be
- # removed as their functionality has been moved to the service layer
- # pre_new
- # pre_create
- # pre_edit
- # pre_show
- # authorize_admin
- before_filter :pre_new, :only => [:new]
- before_filter :pre_create, :only => [:create]
- # the following is to facilitate transition to service layer
- before_filter :tmp_pre_update, :only => [:edit, :update, :destroy]
- before_filter :pre_show, :only => [:show]
- before_filter...
2006 Jul 14
4
sending additional parameters to before_filter
i am trying to create a system so that different users have different
priviliges on my application. i was going to modify my authorize
function so that i could pass the required role to it and have it check
the current user for that role.
i am using before_filter and would like to have just one function
instead of writing one for each role like so:
authorize(role)
instead of:
2009 Sep 29
0
Problem with RESTful resource and ActiveScaffold
...ive_scaffold => true, :has_many
=> [:rooms, :photos, :contracts]
# map.resources :rooms, :active_scaffold => true, :has_many =>
[:contracts]
end
And my UsersController
class Admin::UsersController < ApplicationController
before_filter :jquery_noconflict
before_filter :authorize_admin
layout "admin"
active_scaffold :users
end
Thank you
2009 May 15
0
[PATCH server] use service layer for Network controller.
...trollers/network_controller.rb
+++ b/src/app/controllers/network_controller.rb
@@ -18,471 +18,170 @@
#
class NetworkController < ApplicationController
+ include NetworkService
########################## Networks related actions
- before_filter :pre_list, :only => [:list]
-
- def authorize_admin
- # TODO more robust permission system
- # either by subclassing network from pool
- # or by extending permission model to accomodate
- # any object
- @default_pool = HardwarePool.get_default_pool
- set_perms(@default_pool)
- super('You do not have permission to a...
2009 May 19
1
re-sending outstanding controller refactoring patches after rebase
I've rebased the patch series to the current next branch and am sending them again.