diff options
Diffstat (limited to 'app/controllers/oauth')
-rw-r--r-- | app/controllers/oauth/applications_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/oauth/authorizations_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/oauth/authorized_applications_controller.rb | 10 |
3 files changed, 23 insertions, 3 deletions
diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb index ea256de2c3e..f30a85564d4 100644 --- a/app/controllers/oauth/applications_controller.rb +++ b/app/controllers/oauth/applications_controller.rb @@ -1,6 +1,6 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController before_action :authenticate_user! - layout "profile" + before_action :set_title def index head :forbidden and return @@ -36,4 +36,10 @@ class Oauth::ApplicationsController < Doorkeeper::ApplicationsController rescue_from ActiveRecord::RecordNotFound do |exception| render "errors/not_found", layout: "errors", status: 404 end + + def set_title + @title = "Profile" + @title_url = profile_path + @sidebar = "profile" + end end diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb index 6d3c1a320db..c62890ba85b 100644 --- a/app/controllers/oauth/authorizations_controller.rb +++ b/app/controllers/oauth/authorizations_controller.rb @@ -1,6 +1,6 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController before_action :authenticate_resource_owner! - layout "profile" + before_action :set_title def new if pre_auth.authorizable? @@ -54,4 +54,10 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController def strategy @strategy ||= server.authorization_request(pre_auth.response_type) end + + def set_title + @title = "Profile" + @title_url = profile_path + @sidebar = "profile" + end end diff --git a/app/controllers/oauth/authorized_applications_controller.rb b/app/controllers/oauth/authorized_applications_controller.rb index 0b27ce7da72..6d0bf9889e6 100644 --- a/app/controllers/oauth/authorized_applications_controller.rb +++ b/app/controllers/oauth/authorized_applications_controller.rb @@ -1,8 +1,16 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController - layout "profile" + before_filter :set_title def destroy Doorkeeper::AccessToken.revoke_all_for(params[:id], current_resource_owner) redirect_to applications_profile_url, notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy]) end + + private + + def set_title + @title = "Profile" + @title_url = profile_path + @sidebar = "profile" + end end |