-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Add a projects field to User model. A list of Project
Project model should contain the following fields:
name(required)users(required)description(optional)
Project controller should include the following methods:
create(ADMINonly)update(ADMINonly)delete(ADMINonly)list(ADMINonly. Regular users can list projects which they are member of)show(ADMINonly. Regular users can view projects which they are member of)
Suggested tests:
- Create project using an
ADMINuser (should return 201 - Created) - Create project using a user from any other level (should return 401 - Unauthorized)
- Update project using an
ADMINuser (should return 200 - OK) - Update project using a user from any other level (should return 401 - Unauthorized)
- Delete project using an
ADMINuser (should return 200 - OK) - Delete project using a user from any other level (should return 401 - Unauthorized)
- List all projects using an
ADMINuser (should return 200 - OK) - List all projects using a user from any other level (should return 200 - OK. all the projects listed should have the user as member)
- View a project using an
ADMINuser (should return 200 - OK) - View a project using a user from any other level (should return "200 - OK" if the user is a member of the project, otherwise 401 - Unauthorized)
- Create/Update project without required fields