Skip to content

Commit

Permalink
add tech support role to allowed roles when sending an invite (#1835)
Browse files Browse the repository at this point in the history
### Fixes #1834 

## Description

This fixes a bug where a tech support user cannot add/invite another
user

Looks like the tech support role was left off the list of allowed roles
to send an invite.

## Testing

Verify that the repro steps in the bug report show no error message
  • Loading branch information
megahirt authored Sep 20, 2024
1 parent f2cd9a8 commit 9440327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Api/Model/Shared/Command/UserCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public static function sendInvite(
// Verify authority of $invitingUser to invite someone of this role
$userIsAuthorized = false;
$invitingUserRole = $project->users[$invitingUserId]->role;
$authorizedRoles = [ProjectRoles::MANAGER];
$authorizedRoles = [ProjectRoles::MANAGER, ProjectRoles::TECH_SUPPORT];
if ($roleKey == ProjectRoles::MANAGER) {
$userIsAuthorized = in_array($invitingUserRole, $authorizedRoles);
}
Expand Down

0 comments on commit 9440327

Please sign in to comment.