142 lines
2.5 KiB
JSON
142 lines
2.5 KiB
JSON
{
|
|
"name": "VnUser",
|
|
"base": "User",
|
|
"validateUpsert": true,
|
|
"options": {
|
|
"mysql": {
|
|
"table": "account.user"
|
|
}
|
|
},
|
|
"resetPasswordTokenTTL": "604800",
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"id": true
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"roleFk": {
|
|
"type": "number",
|
|
"mysql": {
|
|
"columnName": "role"
|
|
}
|
|
},
|
|
"nickname": {
|
|
"type": "string"
|
|
},
|
|
"lang": {
|
|
"type": "string"
|
|
},
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"emailVerified": {
|
|
"type": "boolean"
|
|
},
|
|
"created": {
|
|
"type": "date"
|
|
},
|
|
"updated": {
|
|
"type": "date"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"hasGrant": {
|
|
"type": "boolean"
|
|
},
|
|
"passExpired": {
|
|
"type": "date"
|
|
},
|
|
"twoFactor": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"relations": {
|
|
"role": {
|
|
"type": "belongsTo",
|
|
"model": "Role",
|
|
"foreignKey": "roleFk"
|
|
},
|
|
"roles": {
|
|
"type": "hasMany",
|
|
"model": "RoleRole",
|
|
"foreignKey": "role",
|
|
"primaryKey": "roleFk"
|
|
},
|
|
"emailUser": {
|
|
"type": "hasOne",
|
|
"model": "EmailUser",
|
|
"foreignKey": "userFk"
|
|
},
|
|
"worker": {
|
|
"type": "hasOne",
|
|
"model": "Worker",
|
|
"foreignKey": "id"
|
|
},
|
|
"userConfig": {
|
|
"type": "hasOne",
|
|
"model": "UserConfig",
|
|
"foreignKey": "userFk"
|
|
}
|
|
},
|
|
"acls": [
|
|
{
|
|
"property": "signIn",
|
|
"accessType": "EXECUTE",
|
|
"principalType": "ROLE",
|
|
"principalId": "$everyone",
|
|
"permission": "ALLOW"
|
|
},
|
|
{
|
|
"property": "recoverPassword",
|
|
"accessType": "EXECUTE",
|
|
"principalType": "ROLE",
|
|
"principalId": "$everyone",
|
|
"permission": "ALLOW"
|
|
},
|
|
{
|
|
"property": "validateAuth",
|
|
"accessType": "EXECUTE",
|
|
"principalType": "ROLE",
|
|
"principalId": "$everyone",
|
|
"permission": "ALLOW"
|
|
},
|
|
{
|
|
"property": "privileges",
|
|
"accessType": "*",
|
|
"principalType": "ROLE",
|
|
"principalId": "$authenticated",
|
|
"permission": "ALLOW"
|
|
}
|
|
],
|
|
"scopes": {
|
|
"preview": {
|
|
"fields": [
|
|
"id",
|
|
"name",
|
|
"username",
|
|
"roleFk",
|
|
"nickname",
|
|
"lang",
|
|
"active",
|
|
"created",
|
|
"updated",
|
|
"image",
|
|
"hasGrant",
|
|
"realm",
|
|
"email",
|
|
"emailVerified"
|
|
]
|
|
}
|
|
}
|
|
}
|