Merge remote-tracking branch 'parent/main' into upstream-20250210

This commit is contained in:
KMY 2025-02-10 09:09:12 +09:00
commit f3f93ba0c6
108 changed files with 1041 additions and 727 deletions

View file

@ -2,7 +2,6 @@
class Settings::ApplicationsController < Settings::BaseController
before_action :set_application, only: [:show, :update, :destroy, :regenerate]
before_action :prepare_scopes, only: [:create, :update]
def index
@applications = current_user.applications.order(id: :desc).page(params[:page])
@ -60,12 +59,6 @@ class Settings::ApplicationsController < Settings::BaseController
end
def application_params
params
.expect(doorkeeper_application: [:name, :redirect_uri, :scopes, :website])
end
def prepare_scopes
scopes = application_params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
params[:doorkeeper_application][:scopes] = scopes.join(' ') if scopes.is_a? Array
params.expect(doorkeeper_application: [:name, :redirect_uri, :website, scopes: []])
end
end

View file

@ -4,14 +4,9 @@ class Settings::BaseController < ApplicationController
layout 'admin'
before_action :authenticate_user!
before_action :set_cache_headers
private
def set_cache_headers
response.cache_control.replace(private: true, no_store: true)
end
def require_not_suspended!
forbidden if current_account.unavailable?
end