Skip to content

Commit

Permalink
CC-34931 Fixed inverted permissions check on company user enable/disa…
Browse files Browse the repository at this point in the history
…ble actions. (#2572)

CC-34931 Fixed inverted permissions check on company user status change.
  • Loading branch information
limeeugenia authored Feb 27, 2025
1 parent b94ccb3 commit 38c2caa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CompanyUserStatusController extends AbstractCompanyController
*/
public function enableAction(Request $request): RedirectResponse
{
if ($this->can(static::PERMISSION_COMPANY_USER_STATUS_CHANGE)) {
if (!$this->can(static::PERMISSION_COMPANY_USER_STATUS_CHANGE)) {
throw new AccessDeniedHttpException();
}

Expand Down Expand Up @@ -107,7 +107,7 @@ public function enableAction(Request $request): RedirectResponse
*/
public function disableAction(Request $request): RedirectResponse
{
if ($this->can(static::PERMISSION_COMPANY_USER_STATUS_CHANGE)) {
if (!$this->can(static::PERMISSION_COMPANY_USER_STATUS_CHANGE)) {
throw new AccessDeniedHttpException();
}

Expand Down

0 comments on commit 38c2caa

Please sign in to comment.