- layout "site", :except => [:api_details]
-
- 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_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]
+ layout "site"
+
+ skip_before_action :verify_authenticity_token, :only => [:auth_success]
+ before_action :disable_terms_redirect, :only => [:terms, :save, :logout]
+ before_action :authorize_web
+ before_action :set_locale
+ before_action :check_database_readable
+
+ authorize_resource
+