apt-maintenance-account
Version:
Apartment Maintenance Account Tracking Application - Client Side in Angular
120 lines (116 loc) • 1.9 kB
JSON
{
"maintenance_accounts": [
{
"id": 1,
"name": "test owner1",
"owner_id": 1
},
{
"id": 2,
"name": "test owner2",
"owner_id": 1
}
],
"users": [
{
"id": 1,
"name": "user1",
"email": "user1@eastgate.in",
"password": "user1secret"
},
{
"id": 2,
"name": "user2",
"email": "user2@eastgate.in",
"password": "user2secret"
}
],
"roles": [
{
"id": 1,
"name": "guest",
"inherits": "NULL"
},
{
"id": 2,
"name": "member",
"inherits": "1"
},
{
"id": 3,
"name": "supervisor",
"inherits": "2"
},
{
"id": 4,
"name": "manager",
"inherits": "3"
},
{
"id": 5,
"name": "admin",
"inherits": "4"
}
],
"permissions": [
{
"id": 1,
"operations": "R",
"resource": "accounts",
"condition": "return data.userId == data.ownerId;",
"description": "Authorize to read/view Account Records"
},
{
"id": 2,
"operations": "CRUD",
"resource": "users",
"condition": "return data.userId == data.ownerId;",
"description": "Authorize to create/read/update/delete own user"
},
{
"id": 3,
"operations": "CRUD",
"resource": "roles",
"condition": "return data.userId == data.ownerId;",
"description": "Authorize to create/read/update/delete any role"
},
{
"id": 4,
"operations": "CRUD",
"resource": "accounts",
"condition": "return data.userId == data.ownerId;",
"description": "Authorize on CRUD w/ condition"
},
{
"id": 5,
"operations": "CRUD",
"resource": "accounts",
"condition": "",
"description": "Authorize on CRUD w/o condition"
}
],
"permissions_roles": [
{
"permission_id": 1,
"role_id": 1
},
{
"permission_id": 4,
"role_id": 2
},
{
"permission_id": 5,
"role_id": 3
}
],
"roles_users": [
{
"user_id": 1,
"role_id": 1
},
{
"user_id": 1,
"role_id": 3
}
]
}