Displaying 1 result from an estimated 1 matches for "adminaccessrequir".
Did you mean:
adminaccessrequired
2007 Jul 31
2
controller exceptions
...ady defined Merb
controller exception class. The user defined exceptions would have a
method called ''action'' which acts like typical controller action. It
is called to render a page when the exception is raised. For example
# dist/app/exceptions/admin_access_required.rb
class AdminAccessRequired < Merb::ControllerExceptions::Unauthorized
def action
if session[:user].nil?
redirect ''/login''
else
render # views/exceptions/admin_access_required.rhtml
end
end
end
If the user is logged in but does not have administrative access,...