if user
can :welcome, :site
can [:create, :edit, :comment, :subscribe, :unsubscribe], DiaryEntry
+ can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
can [:close, :reopen], Note
can [:new, :create], Report
can [:account, :go_public, :make_friend, :remove_friend, :api_details, :api_gpx_files], User
before_action :authorize_web
before_action :set_locale
- before_action :require_user
+
+ authorize_resource
+
before_action :lookup_user, :only => [:new, :create]
before_action :check_database_readable
before_action :check_database_writable, :only => [:new, :create, :reply, :mark, :destroy]