Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

only check if the tocken is allowed to the this feature

bsatarnejad4907a961afc7
diff --git a/app/services/authorization/enterprise_service.rb b/app/services/authorization/enterprise_service.rb
index 0a4a131b0e8..7a538aec1dc 100644
--- a/app/services/authorization/enterprise_service.rb
+++ b/app/services/authorization/enterprise_service.rb
@@ -69,7 +69,7 @@ class Authorization::EnterpriseService
def process(action)
# Every non-expired token
- GUARDED_ACTIONS.include?(action)
+ GUARDED_ACTIONS.include?(action.to_sym)
end
def result(bool)
diff --git a/lib/redmine/menu_manager/menu_helper.rb b/lib/redmine/menu_manager/menu_helper.rb
index 67f8ddfcd32..87dd11348e2 100644
--- a/lib/redmine/menu_manager/menu_helper.rb
+++ b/lib/redmine/menu_manager/menu_helper.rb
@@ -170,7 +170,7 @@ module Redmine::MenuManager::MenuHelper
lang: menu_item_locale(item)) do
''.html_safe + caption + badge_for(item)
end
- if item.enterprise_feature.present? && !EnterpriseToken.allows_to?(item.enterprise_feature) && !EnterpriseToken.current
+ if item.enterprise_feature.present? && !EnterpriseToken.allows_to?(item.enterprise_feature)
link_text << (' '.html_safe + spot_icon('spot-icon spot-icon_enterprise-badge'))
end
link_text << (' '.html_safe + op_icon(item.icon_after)) if item.icon_after.present?