You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
575 B

12 years ago
class UsersController < ApplicationController
before_filter :authenticate_user!
before_filter :set_stampers
include Userstamp
layout :scoped_layout
rescue_from CanCan::AccessDenied, ActiveScaffold::ActionNotAllowed do |exception|
flash.now[:error] = exception.message
render_access_denied
end
protected
def set_stampers
User.current = current_user
User.stamper = current_user
end
def ensure_nested_under_domain
unless nested? && nested_parent_record.is_a?(Domain)
raise CanCan::AccessDenied, "not found"
end
end
end