Sha256: baff589c7ec54b89c690e4209ae760a9394338e9f5655182d47d2407754f1d8e
Contents?: true
Size: 949 Bytes
Versions: 13
Compression:
Stored size: 949 Bytes
Contents
module CurationConcerns module Admin class WorkflowRolesController < ApplicationController include AdminPage before_action :require_permissions def index @presenter = WorkflowRolePresenter.new end def destroy responsibility = Sipity::WorkflowResponsibility.find(params[:id]) authorize! :destroy, responsibility responsibility.destroy redirect_to admin_workflow_roles_path end def create authorize! :create, Sipity::WorkflowResponsibility form = Forms::WorkflowResponsibilityForm.new(params[:sipity_workflow_responsibility]) begin form.save! rescue ActiveRecord::RecordNotUnique logger.info "Not unique *****\n\n\n" end redirect_to admin_workflow_roles_path end private def require_permissions authorize! :read, :admin_dashboard end end end end
Version data entries
13 entries across 13 versions & 1 rubygems