mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
5d78c7271b
refactor(core,schemas): update roles table schemas, add type col and fix UTs refactor(test,core,schemas): add role type constraint to DB level to keep the data source clean
522 B
522 B
@logto/schemas |
---|
minor |
Add type
field to roles
schema.
type
can be either 'User' or 'MachineToMachine' in our case, this change distinguish between the two types of roles.
Roles with type 'MachineToMachine' are not allowed to be assigned to users and 'User' roles can not be assigned to machine-to-machine apps.
It's worth noting that we do not differentiate by scope
(or permission
in Admin Console), so a scope can be assigned to both the 'User' role and the 'MachineToMachine' role simultaneously.