Ensures that @Redmine::PluginLoader.load@ is executed before @Doorkeeper.configure@ in order to properly load plugin permissions (#24808).

git-svn-id: https://svn.redmine.org/redmine/trunk@23846 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2025-06-25 05:36:13 +00:00
parent 068a2868ae
commit 928f57073e

View File

@@ -10,7 +10,17 @@ Rails.application.config.to_prepare do
ActiveSupport::XmlMini.backend = 'Nokogiri'
Redmine::Preparation.prepare
end
# Load the secret token from the Redmine configuration file
secret = Redmine::Configuration['secret_token']
if secret.present?
RedmineApp::Application.config.secret_token = secret
end
Redmine::PluginLoader.load
Rails.application.config.to_prepare do
Doorkeeper.configure do
orm :active_record
@@ -76,17 +86,7 @@ Rails.application.config.to_prepare do
Doorkeeper::AuthorizationsController.layout "base"
Doorkeeper::AuthorizedApplicationsController.layout "base"
Doorkeeper::AuthorizedApplicationsController.main_menu = false
end
# Load the secret token from the Redmine configuration file
secret = Redmine::Configuration['secret_token']
if secret.present?
RedmineApp::Application.config.secret_token = secret
end
Redmine::PluginLoader.load
Rails.application.config.to_prepare do
default_paths = []
default_paths << Rails.root.join("app/assets/javascripts")
default_paths << Rails.root.join("app/assets/images")