Fix database offline mode
This commit is contained in:
parent
165aa0fa61
commit
6600221fe3
9 changed files with 89 additions and 76 deletions
|
@ -7,10 +7,10 @@ class ChangesetsController < ApplicationController
|
|||
skip_before_action :verify_authenticity_token, :except => [:index]
|
||||
before_action :authorize_web
|
||||
before_action :set_locale
|
||||
before_action(:only => [:index, :feed]) { |c| c.check_database_readable(true) }
|
||||
|
||||
authorize_resource
|
||||
|
||||
before_action(:only => [:index, :feed]) { |c| c.check_database_readable(true) }
|
||||
around_action :web_timeout
|
||||
|
||||
# Helper methods for checking consistency
|
||||
|
|
|
@ -3,11 +3,11 @@ class DiaryEntriesController < ApplicationController
|
|||
|
||||
before_action :authorize_web
|
||||
before_action :set_locale
|
||||
before_action :check_database_readable
|
||||
|
||||
authorize_resource
|
||||
|
||||
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 :allow_thirdparty_images, :only => [:new, :edit, :index, :show, :comments]
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ class TracesController < ApplicationController
|
|||
|
||||
before_action :authorize_web
|
||||
before_action :set_locale
|
||||
before_action :check_database_readable
|
||||
|
||||
authorize_resource
|
||||
|
||||
before_action :check_database_readable
|
||||
before_action :check_database_writable, :only => [:new, :create, :edit, :delete]
|
||||
before_action :offline_warning, :only => [:mine, :show]
|
||||
before_action :offline_redirect, :only => [:new, :create, :edit, :delete, :data]
|
||||
|
|
|
@ -5,11 +5,11 @@ class UsersController < ApplicationController
|
|||
before_action :disable_terms_redirect, :only => [:terms, :save, :logout]
|
||||
before_action :authorize_web
|
||||
before_action :set_locale
|
||||
before_action :check_database_readable
|
||||
|
||||
authorize_resource
|
||||
|
||||
before_action :require_self, :only => [:account]
|
||||
before_action :check_database_readable, :except => [:login]
|
||||
before_action :check_database_writable, :only => [:new, :account, :confirm, :confirm_email, :lost_password, :reset_password, :go_public, :make_friend, :remove_friend]
|
||||
before_action :require_cookies, :only => [:new, :login, :confirm]
|
||||
before_action :lookup_user_by_name, :only => [:set_status, :delete]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue