-
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
User model should contain the following fields:
username(required)password(required)name(required)
User controller should include the following methods:
create(ADMINonly)update(ADMINonly. Regular users can update their name and password only.)delete(ADMINonly)listshow
Suggested tests:
- Create user using an
ADMINuser (should return 201 - Created) - Create user using a user from any other level (should return 401 - Unauthorized)
- Update user using an
ADMINuser (should return 200 - OK) - Update user using a user from any other level (should return 401 - Unauthorized)
- Regular user update other user (should return 401 - Unauthorized)
- Regular user update their name/password (should return 200 - OK)
- Regular user update other field but name/password (should return 401 - Unauthorized)
- Delete user using an
ADMINuser (should return 200 - OK) - Delete user using a user from any other level (should return 401 - Unauthorized)
- List all user using an
ADMINuser (should return 200 - OK) - List all user using a user from any other level (should return 200 - OK)
- View a user using an
ADMINuser (should return 200 - OK) - View a user using a user from any other level (should return 200 - OK)
- Create/Update user without required fields