Skip to content

Commit 5be4542

Browse files
Copilothotlong
andcommitted
fix: address code review feedback - handle undefined profileName in permission context
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent b50544e commit 5be4542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/permissions/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export class PermissionsPlugin implements Plugin {
154154
const permissionContext: PermissionContext = {
155155
userId,
156156
profileName,
157-
profiles: body.profiles || [profileName],
157+
profiles: body.profiles || (profileName ? [profileName] : []),
158158
roleName,
159159
permissionSetNames: body.permissionSetNames || [],
160160
};

0 commit comments

Comments
 (0)