dale
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"forced_destroy_groups": ["SG-okta-cloud-team-admin-access"]
|
||||
"forced_destroy_groups":[
|
||||
"SG-okta-cloud-team-admin-access"
|
||||
],
|
||||
"forced_destroy_period_days": 60
|
||||
}
|
||||
@@ -289,10 +289,11 @@ router.post('/:userId/provisions', passport.ensureAuthenticatedAndIsMe, async (r
|
||||
|
||||
if (theUser && theUser.msGroups && theUser.msGroups.length){
|
||||
const forced_destroy_groups = qmiConfig().forced_destroy_groups;
|
||||
const forced_destroy_period_days = qmiConfig().forced_destroy_period_days;
|
||||
let isGroupFound = theUser.msGroups.some( ai => forced_destroy_groups.includes(ai) );
|
||||
if (isGroupFound) {
|
||||
let dd = new Date();
|
||||
dd.setDate(dd.getDate() + 30);
|
||||
dd.setDate(dd.getDate() + forced_destroy_period_days);
|
||||
req.body['forcedDestroyDate'] = dd;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user