Patch #24007

Change plugins directory through the configuration.yml file

Added by Helder Manuel Torres Vieira 8 months ago. Updated about 1 month ago.

Status:ReopenedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Plugin API
Target version:3.4.0

Description

This patch adds the possibility to change the directory "plugins" of the application through the file configuration.yml.

The patch has been tested with the last Trunk version (15839)

config_plugins_path.diff Magnifier (3.85 KB) Helder Manuel Torres Vieira, 2016-10-05 20:17

Associated revisions

Revision 15963
Added by Jean-Philippe Lang 6 months ago

Change plugins directory through the configuration.yml file (#24007).

Patch by Helder Manuel Torres Vieira.

Revision 15964
Added by Jean-Philippe Lang 6 months ago

Code cleanup (#24007).

History

#1 Updated by Jean-Philippe Lang 8 months ago

  • Status changed from New to Needs feedback

In the comments, you say that Redmine needs to have write permission on the plugins directory. Why is that? I think it should have read permission only.

#2 Updated by Andrey Lobanov (RedSoft) 8 months ago

I agree. Why plugins directory should have write permissions?

#3 Updated by Jean-Philippe Lang 8 months ago

  • Category set to Plugin API
  • Status changed from Needs feedback to New
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.4.0

#4 Updated by Helder Manuel Torres Vieira 8 months ago

Hello,

Sorry, it was a mistake, i was talking about read permissions (not write).

Thanks

#5 Updated by Jean-Philippe Lang 6 months ago

  • Status changed from New to Closed

Patch committed, thanks.

#6 Updated by Go MAEDA about 1 month ago

  • Status changed from Closed to Reopened

config/routes.rb must be aware of plugins_path setting.

Index: config/routes.rb
===================================================================
--- config/routes.rb    (revision 16528)
+++ config/routes.rb    (working copy)
@@ -374,7 +374,7 @@

   get 'robots.txt', :to => 'welcome#robots'

-  Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir|
+  Dir.glob File.expand_path("#{Redmine::Plugin.directory}/*", Rails.root) do |plugin_dir|
     file = File.join(plugin_dir, "config/routes.rb")
     if File.exists?(file)
       begin

#7 Updated by David Côté-Tremblay about 1 month ago

I wish that functionality, would be very great for multitenancy environments.

Also available in: Atom PDF