Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark workflow controllers as prototype #8848

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/controllers/workflow_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class WorkflowController < ApplicationController
before_action :check_prototype
before_action :check_privileges
before_action :get_session_data

Expand Down Expand Up @@ -57,6 +58,13 @@ def tag_edit_form_field_changed

private

def check_prototype
return if Settings.prototype.ems_workflows.enabled

log_privileges(false, "Workflows are not enabled. The user is not authorized for this task or item.")
raise MiqException::RbacPrivilegeException, _('The user is not authorized for this task or item.')
end

def textual_group_list
[%i[properties relationships smart_management]]
end
Expand Down
9 changes: 9 additions & 0 deletions app/controllers/workflow_repository_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class WorkflowRepositoryController < ApplicationController
before_action :check_prototype

before_action :check_privileges
before_action :get_session_data

Expand Down Expand Up @@ -32,6 +34,13 @@ def show

private

def check_prototype
return if Settings.prototype.ems_workflows.enabled

log_privileges(false, "Workflows are not enabled. The user is not authorized for this task or item.")
raise MiqException::RbacPrivilegeException, _('The user is not authorized for this task or item.')
end

def textual_group_list
[%i[properties relationships options smart_management]]
end
Expand Down