Skip to content

Add User feature #7

@amaurymedeiros

Description

@amaurymedeiros

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 (ADMIN only)
  • update (ADMIN only. Regular users can update their name and password only.)
  • delete (ADMIN only)
  • list
  • show

Suggested tests:

  • Create user using an ADMIN user (should return 201 - Created)
  • Create user using a user from any other level (should return 401 - Unauthorized)
  • Update user using an ADMIN user (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 ADMIN user (should return 200 - OK)
  • Delete user using a user from any other level (should return 401 - Unauthorized)
  • List all user using an ADMIN user (should return 200 - OK)
  • List all user using a user from any other level (should return 200 - OK)
  • View a user using an ADMIN user (should return 200 - OK)
  • View a user using a user from any other level (should return 200 - OK)
  • Create/Update user without required fields

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions