before_action :authorize_web
before_action :set_locale
- before_action :require_user, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe]
+
+ authorize_resource
+
- before_action :lookup_user, :only => [:view, :comments]
+ before_action :lookup_user, :only => [:show, :comments]
before_action :check_database_readable
before_action :check_database_writable, :only => [:new, :edit, :comment, :hide, :hidecomment, :subscribe, :unsubscribe]
- before_action :require_administrator, :only => [:hide, :hidecomment]
- before_action :allow_thirdparty_images, :only => [:new, :edit, :list, :view, :comments]
+ before_action :allow_thirdparty_images, :only => [:new, :edit, :index, :show, :comments]
def new
@title = t "diary_entry.new.title"
-class UserController < ApplicationController
+class UsersController < ApplicationController
layout "site", :except => [:api_details]
- skip_before_action :verify_authenticity_token, :only => [:api_read, :api_details, :api_gpx_files, :auth_success]
+ skip_authorization_check :only => [:login, :logout]
+
+ skip_before_action :verify_authenticity_token, :only => [:api_read, :api_users, :api_details, :api_gpx_files, :auth_success]
before_action :disable_terms_redirect, :only => [:terms, :save, :logout, :api_details]
before_action :authorize, :only => [:api_details, :api_gpx_files]
- before_action :authorize_web, :except => [:api_read, :api_details, :api_gpx_files]
- before_action :set_locale, :except => [:api_read, :api_details, :api_gpx_files]
+ before_action :authorize_web, :except => [:api_read, :api_users, :api_details, :api_gpx_files]
+ before_action :set_locale, :except => [:api_read, :api_users, :api_details, :api_gpx_files]
before_action :require_user, :only => [:account, :go_public, :make_friend, :remove_friend]
before_action :require_self, :only => [:account]
- before_action :check_database_readable, :except => [:login, :api_read, :api_details, :api_gpx_files]
+ before_action :check_database_readable, :except => [:login, :api_read, :api_users, :api_details, :api_gpx_files]
before_action :check_database_writable, :only => [:new, :account, :confirm, :confirm_email, :lost_password, :reset_password, :go_public, :make_friend, :remove_friend]
- before_action :check_api_readable, :only => [:api_read, :api_details, :api_gpx_files]
+ before_action :check_api_readable, :only => [:api_read, :api_users, :api_details, :api_gpx_files]
before_action :require_allow_read_prefs, :only => [:api_details]
before_action :require_allow_read_gpx, :only => [:api_gpx_files]
before_action :require_cookies, :only => [:new, :login, :confirm]