Prepped take-home assignment Scenario
You have been assigned to lead the development of a project management platform (eg. Jira, Twillio, etc) which includes a variety of roles that users could be assigned to.
These roles will acquire different permissions and so a hierarchical permission system must be designed that allows specific roles to have certain visibility and action functions as well as the ability to inherit higher level permissions. As a baseline, assigned roles allow access to certain permissions.
Reference Appendix 1 for further clarity.
Basic requirements:
– Create a data model and function/class that handles user’s permission based on role.
Extended requirements (bonus):
– How could this be used on the Front-end?
Language:
• Javascript
Time allocated:
• There is no specific time allocation however, it is recommended that you spend approximately 3 hours.
What we are looking for:
• Working function(s) and a data model that satisfies the basic requirement. • Well understood architectural pattern and code breakdown.
• File(s) with relevant implementation.
What we are NOT looking for:
• Entire end-to-end functioning Node server with database and API layer • DB integration
Expected deliverables:
• Relevant code files on Github or zipped file
Appendix 1
Here are the example permissions to help you understand:
Organization level
Manager
User
Permissions
• Invite/remove users to/from the organization
• Create projects
• See all projects
• Invite/remove users to/from
projects (**Project level permission)
• Assign/unassign users to tasks
(**Task level permission)
• Invite users to the organization • Create projects
• See assigned projects
Project level
Project Lead
Project participant
Permissions
• Invite/remove users to/from the project
• Create/Delete tasks
• Assign/unassign users to tasks
• Can mark tasks as Done (**Task level
permission)
• Invite users to the project • Create tasks
Task level
Reporter
Assignee
Permissions
• Can mark their task as Done
• Can assign project participant to
the tasks
• Can unassigns their task • Can delete the tasks
• Can assign project participant to the tasks
• Can unassigns their task
Example user flow:
– Organizational Manager will be able to invite users to any projects even if they are not assigned to any project.
– Organizational User who is a Project participant can only see assigned projects and can invite Organizational users to the project and create tasks.