Skip to content

Commit

Permalink
add acl
Browse files Browse the repository at this point in the history
  • Loading branch information
fadlifajrin authored and dikyarga committed Apr 19, 2019
1 parent 54e04e2 commit 6bf7572
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 59 deletions.
28 changes: 27 additions & 1 deletion common/models/event-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,32 @@
}
}
},
"acls": [],
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
},
{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
}
],
"methods": {}
}
28 changes: 27 additions & 1 deletion common/models/list-of-attendees.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,32 @@
}
}
},
"acls": [],
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
}
],
"methods": {}
}
35 changes: 34 additions & 1 deletion common/models/organization.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,39 @@
}
}
},
"acls": [],
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "create"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "find"
}
],
"methods": {}
}
28 changes: 27 additions & 1 deletion common/models/participant.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,32 @@
"through": "ListOfAttendees"
}
},
"acls": [],
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
}
],
"methods": {}
}
28 changes: 27 additions & 1 deletion common/models/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@
"foreignKey": ""
}
},
"acls": [],
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
}
],
"methods": {}
}
28 changes: 27 additions & 1 deletion common/models/room-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,32 @@
"foreignKey": ""
}
},
"acls": [],
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
},
{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "admin",
"permission": "ALLOW",
"property": "*"
}
],
"methods": {}
}
62 changes: 9 additions & 53 deletions common/models/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,74 +25,30 @@
}
},
"acls": [
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "register"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "updateDeviceToken"
},
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "customLogin"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "tryNotify"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "me"
"permission": "DENY"
},
{
"accessType": "EXECUTE",
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "findById"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "find"
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "__get__reviews"
"principalId": "admin",
"permission": "ALLOW"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"principalId": "admin",
"permission": "ALLOW",
"property": "__count__reviews"
"property": "*"
}
],
"methods": {}
Expand Down

0 comments on commit 6bf7572

Please sign in to comment.