Shaulbm / moovNowMVP

0 stars 0 forks source link

Allow to create hierarchy with tokens only #602

Closed Shaulbm closed 4 months ago

Shaulbm commented 6 months ago

The admin should be able to change codes in the following manner:

Codes A, B, C: Manager will get Code A ICs will get Codes B,C

We would like that there will be no restrictions on the order of registration

So - in Access Tokens we will save the parent Id.

Now, when we are registering - we will perform 2 actions:

  1. If there is a parent Id - verify if there is a user with this Id or with this token (as the user might have registered after the tokens change)
  2. When a user is created, get all the users that have Manager's the tokenBody (A) in their parentId field and replace it with the parent user Id.