Skip to content

Instantly share code, notes, and snippets.

@manduks
Created August 15, 2017 05:16
Show Gist options
  • Save manduks/99c0bacaee18cfc713b8bcd69ad5d475 to your computer and use it in GitHub Desktop.
Save manduks/99c0bacaee18cfc713b8bcd69ad5d475 to your computer and use it in GitHub Desktop.
a simple json for roles definition
{
modules: {
account: ["canChangePassword", "canUpdateProfile", "canDeleteUser", "..."],
projects: ["canCreate", "...."],
teams: [...],
messages: [...],
Analytics: [...],
Other: [..],
}
teams: {
0001: {
messages: {
chanel: ["canCreate", "...."],
},
dashboard: {
meetings: ["canCreate", "...."],
teams: ["canCreate", "...."],
},
protocol: {
overview: ["canCreate", "...."],
hypotheses: ["canCreate", "...."],
budget: ["canCreate", "...."],
},
assessment: {
kickoff: ["canCreate", "...."],
topicSpecificMeetings: ["canCreate", "...."],
consultSummary: ["canCreate", "...."],
},
admin: {
investigator: ["canCreate", "...."],
team: ["canCreate", "...."],
roles: ["canCreate", "...."],
},
},
0002: {
messages: {
chanel: ["canCreate", "...."],
},
dashboard: {
meetings: ["canCreate", "...."],
teams: ["canCreate", "...."],
},
protocol: {
overview: ["canCreate", "...."],
hypotheses: ["canCreate", "...."],
budget: ["canCreate", "...."],
},
assessment: {
kickoff: ["canCreate", "...."],
topicSpecificMeetings: ["canCreate", "...."],
consultSummary: ["canCreate", "...."],
},
admin: {
investigator: ["canCreate", "...."],
team: ["canCreate", "...."],
roles: ["canCreate", "...."],
},
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment