acces token table

This commit is contained in:
Simon Martens
2025-05-23 09:32:01 +02:00
parent b81d783e8c
commit 9e922aa49a
9 changed files with 271 additions and 30 deletions

View File

@@ -30,8 +30,15 @@ func init() {
Values: dbmodels.USER_ROLES,
}
deactivatedField := &core.BoolField{
Name: dbmodels.USERS_DEACTIVATED_FIELD,
Required: false,
Presentable: false,
}
collection.Fields.Add(settingsField)
collection.Fields.Add(roleField)
collection.Fields.Add(deactivatedField)
app.Logger().Info("Adding 'settings' JSON field to 'users' collection", "collectionId", collection.Id)
@@ -50,6 +57,7 @@ func init() {
collection.Fields.RemoveByName(dbmodels.USERS_SETTINGS_FIELD)
collection.Fields.RemoveByName(dbmodels.USERS_ROLE_FIELD)
collection.Fields.RemoveByName(dbmodels.USERS_DEACTIVATED_FIELD)
if err := app.Save(collection); err != nil {
app.Logger().Warn("Failed to remove 'settings' field during rollback (it might not exist)",
"collectionId", collection.Id,