Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (64 sloc) 1.26 KB
{
"name": "MyUser",
"base": "User",
"idInjection": true,
"options": {
"validateUpsert": true
},
"admin": {
"defaultProperty": "email",
"listProperties": [
"email",
"username"
],
"editProperties": [
"email",
"username",
"password"
],
"includeRelations": [
"uploads",
"typetest",
"identities"
],
"helpers": [{
"type": "upload",
"name": "Upload Photo",
"property": "photo",
"endpoint": "/api/MyUsers/:id/upload/photo"
}, {
"type": "upload",
"name": "Upload Background",
"property": "background",
"endpoint": "/api/MyUsers/:id/upload/background"
}]
},
"properties": {},
"validations": [],
"relations": {
"identities": {
"type": "hasMany",
"model": "UserIdentity",
"foreignKey": "userId"
},
"typetest": {
"type": "hasOne",
"model": "TypeTest",
"foreignKey": "ownerId"
}
},
"acls": [{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$owner",
"permission": "ALLOW",
"property": "upload"
}, {
"accessType": "*",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
}],
"methods": {}
}