File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -222,10 +222,7 @@ const authPlugin: FastifyPluginAsync = async (fastify, _options) => {
222222 message : "Invalid token." ,
223223 } ) ;
224224 }
225- request . log . info (
226- { type : "audit" , actor : request . username } ,
227- "authenticated request" ,
228- ) ;
225+ request . log . info ( `authenticated request from ${ request . username } ` ) ;
229226 return userRoles ;
230227 } ,
231228 ) ;
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
281281 actor : request . username ,
282282 target : request . body . add [ i ] ,
283283 } ,
284- `failed to add added target to group ID ${ groupId } ` ,
284+ `failed to add target to group ID ${ groupId } ` ,
285285 ) ;
286286 if ( result . reason instanceof EntraGroupError ) {
287287 response . failure . push ( {
@@ -300,7 +300,23 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
300300 const result = removeResults [ i ] ;
301301 if ( result . status === "fulfilled" ) {
302302 response . success . push ( { email : request . body . remove [ i ] } ) ;
303+ request . log . info (
304+ {
305+ type : "audit" ,
306+ actor : request . username ,
307+ target : request . body . add [ i ] ,
308+ } ,
309+ `removed target from group ID ${ groupId } ` ,
310+ ) ;
303311 } else {
312+ request . log . info (
313+ {
314+ type : "audit" ,
315+ actor : request . username ,
316+ target : request . body . add [ i ] ,
317+ } ,
318+ `failed to remove target from group ID ${ groupId } ` ,
319+ ) ;
304320 if ( result . reason instanceof EntraGroupError ) {
305321 response . failure . push ( {
306322 email : request . body . add [ i ] ,
You can’t perform that action at this time.
0 commit comments