-
Notifications
You must be signed in to change notification settings - Fork 0
Permissions
goje87 edited this page Feb 1, 2012
·
1 revision
- Every object will have an owner who has right to do anything with the object.
- There will be a special user 'all' which means everyone. The user id of 'all' is 'all' itself.
- Every objects would maintain the information about the permission rights in
meta.rightswhich will be as per the snippet given below. -
meta.rights.xxx(wherexxxcan be eitherview,modifyordelete) would store an array of user ids who would have permission to perform the respective action. - Since the owner has right to perform any action, his id need not be present in any of the list mentioned above.
Example object to indicate meta.rights
{
username: 'goje87',
fullname: 'Abhilash Goje',
meta: {
id: 'xxxxxxxx',
type: 'xxxxx',
rights: {
view: ['all'],
modify: ['xxxxxxxx', 'xxxxxxxx',...],
delete: ['xxxxxxx', 'xxxxxx']
}
}
}