Commit e55bdc8e authored by Rich Gerdes's avatar Rich Gerdes Committed by Rich Gerdes
Browse files

Issue #2928626 by richgerdes: RAC should grant delete operation

parent b60ce34b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class RoleAccessProvider extends ReferenceAccessProvider {
          'gid' => 2,
          'grant_view' => 1,
          'grant_update' => 1,
          'grant_delete' => 0,
          'grant_delete' => 1,
          'priority' => 0,
        ];

@@ -92,8 +92,9 @@ class RoleAccessProvider extends ReferenceAccessProvider {
    $grants = [];

    $access = ($operation === 'view') ? 1 : 2;
    $role_operation = ($access === 1) ? 'view' : 'update';

    $userRoles = _rac_get_account_roles($operation, $account);
    $userRoles = _rac_get_account_roles($role_operation, $account);
    foreach ($userRoles as $role) {
      $grants["rac_" . $role->id()][] = $access;
    }