File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/services/api/src/modules/auth/lib Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,12 @@ export class SuperTokensCookieBasedSession extends Session {
6363 user . id ,
6464 organizationId ,
6565 ) ;
66- const organization = await this . storage . getOrganization ( { organizationId } ) ;
66+ const [ organization , oidcIntegration ] = await Promise . all ( [
67+ this . storage . getOrganization ( { organizationId } ) ,
68+ this . storage . getOIDCIntegrationForOrganization ( {
69+ organizationId,
70+ } ) ,
71+ ] ) ;
6772 const organizationMembership = await this . organizationMembers . findOrganizationMembership ( {
6873 organization,
6974 userId : user . id ,
@@ -108,6 +113,10 @@ export class SuperTokensCookieBasedSession extends Session {
108113 ] ;
109114 }
110115
116+ if ( oidcIntegration ?. oidcUserAccessOnly && this . oidcIntegrationId !== oidcIntegration . id ) {
117+ return [ ] ;
118+ }
119+
111120 this . logger . debug (
112121 'Translate organization role assignments to policy statements. (userId=%s, organizationId=%s)' ,
113122 user . id ,
You can’t perform that action at this time.
0 commit comments