Skip to content

Commit

Permalink
Update access-control.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Achintha Isuru committed Oct 28, 2023
1 parent 37091bb commit 25586d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/core/src/helpers/access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ export const hasRequiredScopes = (

// TODO: Remove this variable once the hasRequiredScopes() function is moved as a hook.
const windowOrgType: string = window["AppUtils"].getOrganizationType();
const windowLegacyAuthzRuntime: boolean = window["AppUtils"]?.getConfig()?.legacyAuthzRuntime;

if (scopes instanceof Array) {
if (!isLegacyRuntimeEnabled && windowOrgType === OrganizationType.SUBORGANIZATION) {
if (windowLegacyAuthzRuntime && windowOrgType === OrganizationType.SUBORGANIZATION) {
/**
* If the organization type is `SUBORGANIZATION`, the `internal_` scopes should be replaced with
* `internal_org_` scopes.
Expand Down

0 comments on commit 25586d8

Please sign in to comment.