Last active
October 25, 2018 17:05
-
-
Save sacarino/52ea4d9f29e849a4a0469d7d306ccd3f to your computer and use it in GitHub Desktop.
Some sane LoopbackJS ACL defaults / examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// authenticated access to READ the model, but only admin or owner of the model can CRUD | |
... | |
"acls": [{ | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "DENY" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "admin", | |
"permission": "ALLOW" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$owner", | |
"permission": "ALLOW" | |
}, { | |
"accessType": "READ", | |
"principalType": "ROLE", | |
"principalId": "$authenticated", | |
"permission": "ALLOW" | |
}], | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// public access to READ the model, but only admin or owner of the model can CRUD | |
... | |
"acls": [{ | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "DENY" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "admin", | |
"permission": "ALLOW" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$owner", | |
"permission": "ALLOW" | |
}, { | |
"accessType": "READ", | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "ALLOW" | |
}], | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only admin and the owner of the model can CRUD | |
... | |
"acls": [{ | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "DENY" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "admin", | |
"permission": "ALLOW" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$owner", | |
"permission": "ALLOW" | |
}], | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only admin can CRUD the model | |
... | |
"acls": [{ | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "$everyone", | |
"permission": "DENY" | |
}, { | |
"accessType": "*", | |
"principalType": "ROLE", | |
"principalId": "admin", | |
"permission": "ALLOW" | |
}], | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment