Skip to content

Add Project feature #4

@amaurymedeiros

Description

@amaurymedeiros

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 (ADMIN only)
  • update (ADMIN only)
  • delete (ADMIN only)
  • list (ADMIN only. Regular users can list projects which they are member of)
  • show (ADMIN only. Regular users can view projects which they are member of)

Suggested tests:

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions