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

Remove redundant naming from Strategy

Klaus Zanders28d9de055328
diff --git a/app/models/sharing_strategies/base_strategy.rb b/app/models/sharing_strategies/base_strategy.rb
index 08218942747..6a8b2f7d7a7 100644
--- a/app/models/sharing_strategies/base_strategy.rb
+++ b/app/models/sharing_strategies/base_strategy.rb
@@ -40,7 +40,7 @@ module SharingStrategies
raise NotImplementedError, "Override in a subclass and return an array of roles that should be displayed"
end
- def sharing_manageable?
+ def manageable?
raise NotImplementedError, "Override in a subclass and return true if the current user can manage sharing"
end
diff --git a/app/models/sharing_strategies/project_query_strategy.rb b/app/models/sharing_strategies/project_query_strategy.rb
index c1b7b4551b0..203277b503b 100644
--- a/app/models/sharing_strategies/project_query_strategy.rb
+++ b/app/models/sharing_strategies/project_query_strategy.rb
@@ -39,7 +39,7 @@ module SharingStrategies
end
end
- def sharing_manageable?
+ def manageable?
@entity.editable?
end
diff --git a/app/models/sharing_strategies/work_package_strategy.rb b/app/models/sharing_strategies/work_package_strategy.rb
index b5a3770c9eb..1e59a99cb08 100644
--- a/app/models/sharing_strategies/work_package_strategy.rb
+++ b/app/models/sharing_strategies/work_package_strategy.rb
@@ -45,7 +45,7 @@ module SharingStrategies
]
end
- def sharing_manageable?
+ def manageable?
user.allowed_in_project?(:share_work_packages, @entity.project)
end