@@ -315,8 +315,8 @@ async function getGroup(currentUser, groupId, criteria) {
315
315
) } `
316
316
)
317
317
318
- if ( ! _ . has ( criteria , 'isCache ' ) ) {
319
- criteria . isCache = true
318
+ if ( _ . has ( criteria , 'skipCache ' ) ) {
319
+ criteria . skipCache = false
320
320
}
321
321
322
322
if ( criteria . includeSubGroups && criteria . includeParentGroup ) {
@@ -372,12 +372,12 @@ async function getGroup(currentUser, groupId, criteria) {
372
372
let groupToReturn
373
373
374
374
try {
375
- if ( criteria . isCache ) {
375
+ if ( ! criteria . skipCache ) {
376
376
// check for the availibility of the group in cache
377
377
groupToReturn = cache . get ( groupId )
378
378
}
379
379
380
- if ( criteria . isCache && groupToReturn ) {
380
+ if ( ! criteria . skipCache && groupToReturn ) {
381
381
if ( ! isAdmin ) delete groupToReturn . status
382
382
383
383
// if the group is private, the user needs to be a member of the group, or an admin
@@ -480,6 +480,7 @@ getGroup.schema = {
480
480
includeSubGroups : Joi . boolean ( ) . default ( false ) ,
481
481
includeParentGroup : Joi . boolean ( ) . default ( false ) ,
482
482
flattenGroupIdTree : Joi . boolean ( ) . default ( false ) ,
483
+ skipCache : Joi . boolean ( ) . default ( false ) ,
483
484
oneLevel : Joi . boolean ( ) ,
484
485
fields : Joi . string ( )
485
486
} )
0 commit comments