@@ -21,9 +21,9 @@ import { Logger } from 'winston';
2121
2222// Create a ids client instance
2323let idsClientInstance : UserServiceClient ;
24+ const cfg = createServiceConfig ( process . cwd ( ) ) ;
2425const getUserServiceClient = async ( ) => {
2526 if ( ! idsClientInstance ) {
26- const cfg = createServiceConfig ( process . cwd ( ) ) ;
2727 // identity-srv client to resolve subject ID by token
2828 const grpcIDSConfig = cfg . get ( 'client:user' ) ;
2929 const loggerCfg = cfg . get ( 'logger' ) ;
@@ -124,7 +124,7 @@ export async function checkAccessRequest(ctx: GQLClientContext, resource: Resour
124124
125125 let result : DecisionResponse | PolicySetRQResponse ;
126126 try {
127- result = await accessRequest ( subject , resource , action , ctx , operation ) ;
127+ result = await accessRequest ( subject , resource , action , ctx , { operation, roleScopingEntityURN : cfg ?. get ( 'authorization:urns:organization' ) } ) ;
128128 } catch ( err ) {
129129 return {
130130 decision : Response_Decision . DENY ,
@@ -148,11 +148,11 @@ export function _filterJobData(data: Data, encode: boolean, logger: Logger): Pic
148148 }
149149 }
150150
151- if ( picked ?. meta ?. created && typeof picked . meta . created === 'string' ) {
151+ if ( picked ?. meta ?. created && typeof picked . meta . created === 'string' ) {
152152 picked . meta . created = new Date ( picked . meta . created ) ;
153153 }
154154
155- if ( picked ?. meta ?. modified && typeof picked . meta . modified === 'string' ) {
155+ if ( picked ?. meta ?. modified && typeof picked . meta . modified === 'string' ) {
156156 picked . meta . modified = new Date ( picked . meta . modified ) ;
157157 }
158158
0 commit comments