Use custom capability to manage access to order delivery process
This commit is contained in:
@@ -42,7 +42,7 @@ class Wiaas_Admin_Order_Process_Flow {
|
||||
|
||||
if ($delivery_process &&
|
||||
wp_verify_nonce($_POST['wiaas_delivery_process_navigation_nonce'], 'wiaas_delivery_process_navigation') &&
|
||||
GFAPI::current_user_can_any( 'gravityflow_workflow_detail_admin_actions' )) {
|
||||
GFAPI::current_user_can_any( 'manage_wiaas_order_delivery_process' )) {
|
||||
|
||||
self::_maybe_process_admin_step_change_action($delivery_process);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ if ( ! empty($delivery_process)) {
|
||||
</h1>
|
||||
|
||||
<?php
|
||||
if (GFAPI::current_user_can_any( 'gravityflow_workflow_detail_admin_actions' )) {
|
||||
if (GFAPI::current_user_can_any( 'manage_wiaas_order_delivery_process' )) {
|
||||
|
||||
?>
|
||||
<p>
|
||||
@@ -106,7 +106,7 @@ if ( ! empty($delivery_process)) {
|
||||
|
||||
if (! empty($delivery_process)) {
|
||||
|
||||
if ($current_step && GFAPI::current_user_can_any( 'gravityflow_workflow_detail_admin_actions' )) {
|
||||
if ($current_step && GFAPI::current_user_can_any( 'manage_wiaas_order_delivery_process' )) {
|
||||
|
||||
require 'html-delivery-process-navigation.php';
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ if ($is_current_step) {
|
||||
|
||||
$action_entry_step = $action_workflow->get_current_step($action_entry);
|
||||
|
||||
$show_entry = GFAPI::current_user_can_any( 'gravityflow_workflow_detail_admin_actions' ) ||
|
||||
$show_entry = GFAPI::current_user_can_any( 'manage_wiaas_order_delivery_process' ) ||
|
||||
($action_entry_step &&
|
||||
$action_entry_step->is_assignee($current_assignee_key));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user