gorrion-io / danger-zone

Danger Zone App - "Wujek Guzy" project for Gorrions and KN Fullstack members #nestjs #react #typescript #javascript #graphql
MIT License
6 stars 13 forks source link

KN FULLSTACK - first task #2

Open Siemko opened 4 years ago

Siemko commented 4 years ago

Hi there, Fullstack members!

FIRST TASK

As you can see the project is in its first phase. We need your help with backend this time.

Your task is to create USER ROLES:

Create three roles: USER, ADMIN, MODERATOR, save role in user document in DB and prepare guard for graphql queries and mutations (access to query/mutation if user has selected role(s)).

We will check if your code works, meets requirements and is clean.

TIME LIMIT

You have time to complete task until 20.12.2019, 20:00 (GMT+1)


INSTRUCTION FOR BEGINNERS

If you have any problems with task, check out following step-by-step instruction:

Before starting fork the repo as stated in docs

  1. Create enum with ROLES.
  2. Register that enum in GraphQL: docs
  3. Add appropriate fields in user schema, modify UsersService.
  4. Create guard (you can check both NestJS docs and existing AuthGuard).
  5. Show usage of Guard in one query/mutation.

After finishing the task, create merge request as in docs

ANY QUESTIONS?

You can ask your question related to task in this issue or on Fullstack+ Facebook Group.

Siemko commented 4 years ago

Please name your branch: user-roles-<your_name>