プロジェクト

全般

プロフィール

Vote #77873

未完了

Change plugins directory through the configuration.yml file

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Reopend
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
0
issue_org_id:
24007
author_id:
119076
assigned_to_id:
0
comments:
14
status_id:
8
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Reopend]

説明

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)


journals

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.
--------------------------------------------------------------------------------
I agree. Why plugins directory should have write permissions?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Hello,

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

Thanks

--------------------------------------------------------------------------------
Patch committed, thanks.
--------------------------------------------------------------------------------
@config/routes.rb@ must be aware of @plugins_path@ setting.

<pre><code class="diff">
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
</code></pre>
--------------------------------------------------------------------------------
I wish that functionality, would be very great for multitenancy environments.
--------------------------------------------------------------------------------
Fix committed, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Reopening this issue because a fix for this feature has been submitted as #26139.
--------------------------------------------------------------------------------
Is r16654 correct?
config_plugins_path.diff defines Redmine::Plugin.directory as "Absolute path to the directory where plugins are stored.".
File.expand_path("#{Redmine::Plugin.directory}/*", Rails.root) maybe returns "#{Rails.root}/#{Redmine::Plugin.directory}/*"
--------------------------------------------------------------------------------
Sho HASHIMOTO wrote:
> Is r16654 correct?
> config_plugins_path.diff defines Redmine::Plugin.directory as "Absolute path to the directory where plugins are stored.".
> File.expand_path("#{Redmine::Plugin.directory}/*", Rails.root) maybe returns "#{Rails.root}/#{Redmine::Plugin.directory}/*"

No it does not returns that because the first argument is an absolute path. But for clarity, I've removed the second arg that is not used. Thanks for pointing this out.
--------------------------------------------------------------------------------
The current implementation does not support loading plugin gemfiles (#26139), I've removed the option in the configuration file for 3.4.0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,13927,Reduce coupling between plugins and the "plugins/" directory
blocks,Reopened,26139,Follow Gemfile's plugin loader as #24007

Admin Redmine さんが約2年前に更新

  • カテゴリPlugin API_20 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0