@@ -21,9 +21,9 @@ import { Logger } from 'winston';
21
21
22
22
// Create a ids client instance
23
23
let idsClientInstance : UserServiceClient ;
24
+ const cfg = createServiceConfig ( process . cwd ( ) ) ;
24
25
const getUserServiceClient = async ( ) => {
25
26
if ( ! idsClientInstance ) {
26
- const cfg = createServiceConfig ( process . cwd ( ) ) ;
27
27
// identity-srv client to resolve subject ID by token
28
28
const grpcIDSConfig = cfg . get ( 'client:user' ) ;
29
29
const loggerCfg = cfg . get ( 'logger' ) ;
@@ -124,7 +124,7 @@ export async function checkAccessRequest(ctx: GQLClientContext, resource: Resour
124
124
125
125
let result : DecisionResponse | PolicySetRQResponse ;
126
126
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' ) } ) ;
128
128
} catch ( err ) {
129
129
return {
130
130
decision : Response_Decision . DENY ,
@@ -148,11 +148,11 @@ export function _filterJobData(data: Data, encode: boolean, logger: Logger): Pic
148
148
}
149
149
}
150
150
151
- if ( picked ?. meta ?. created && typeof picked . meta . created === 'string' ) {
151
+ if ( picked ?. meta ?. created && typeof picked . meta . created === 'string' ) {
152
152
picked . meta . created = new Date ( picked . meta . created ) ;
153
153
}
154
154
155
- if ( picked ?. meta ?. modified && typeof picked . meta . modified === 'string' ) {
155
+ if ( picked ?. meta ?. modified && typeof picked . meta . modified === 'string' ) {
156
156
picked . meta . modified = new Date ( picked . meta . modified ) ;
157
157
}
158
158
0 commit comments