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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
sort actions guarded in Authorization::EnterpriseService
Ivan Kuchin93de58137811
diff --git a/app/services/authorization/enterprise_service.rb b/app/services/authorization/enterprise_service.rbindex 73a36c2ef60..f07c857f0da 100644--- a/app/services/authorization/enterprise_service.rb+++ b/app/services/authorization/enterprise_service.rb@@ -29,7 +29,7 @@class Authorization::EnterpriseServiceattr_accessor :token- GUARDED_ACTIONS = %i(+ GUARDED_ACTIONS = %i[baseline_comparisonboard_viewconditional_highlighting@@ -37,20 +37,20 @@ class Authorization::EnterpriseServicedate_alertsdefine_custom_styleedit_attribute_groups+ gantt_pdf_exportgrid_widget_wp_graphldap_groups+ one_drive_sharepoint_file_storageopenid_providersplaceholder_users+ project_list_sharingreadonly_work_packagesteam_planner_viewtwo_factor_authentication+ virus_scanningwork_package_query_relation_columnswork_package_sharing- one_drive_sharepoint_file_storage- virus_scanning- gantt_pdf_export- project_list_sharing- ).freeze+ ].freezedef initialize(token)self.token = tokendiff --git a/spec/services/authorization/enterprise_service_spec.rb b/spec/services/authorization/enterprise_service_spec.rbindex 645415ac054..027e251c235 100644--- a/spec/services/authorization/enterprise_service_spec.rb+++ b/spec/services/authorization/enterprise_service_spec.rb@@ -43,6 +43,14 @@ RSpec.describe Authorization::EnterpriseService dolet(:result) { instance.call(action) }let(:action) { :an_action }+ describe "GUARDED_ACTIONS" do+ it "is in alphabetical order" do+ guarded_actions = described_class::GUARDED_ACTIONS++ expect(guarded_actions).to eq(guarded_actions.sort)+ end+ end+describe "#initialize" doit "has the token" doexpect(instance.token).to eql token