feat: update user access (#151)

* feat: update user access

* revoked timestamp field updated

* updates

* updates

* updates
This commit is contained in:
Anik Ghosh
2022-03-24 14:13:55 +05:30
committed by GitHub
parent 1f3dec6ea6
commit b2541c8e9a
13 changed files with 477 additions and 7 deletions

View File

@@ -70,6 +70,10 @@ func MagicLinkLoginResolver(ctx context.Context, params model.MagicLinkLoginInpu
// 2. user has not signed up for one of the available role but trying to signup.
// Need to modify roles in this case
if user.RevokedTimestamp != nil {
return res, fmt.Errorf(`user access has been revoked`)
}
// find the unassigned roles
if len(params.Roles) <= 0 {
inputRoles = envstore.EnvStoreObj.GetSliceStoreEnvVariable(constants.EnvKeyDefaultRoles)