Skip to content

Create users with roles, that include special permissions

Notifications You must be signed in to change notification settings

ks-ieremenko/user-sequelize-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User app

The goal of a project is to create users with roles, that include special permissions.

Used technologies: Express, MySQL+Sequelize


  • Install dependencies with npm install
  • Run the express server with npm start
  • Open your browser in localhost:3000 and try the example REST endpoints.

  • User endpoints
    • localhost:3000/user (GET) - get all users
    • localhost:3000/user/[someid] (GET) - get user by id
    • localhost:3000/user/post (POST) - create a user
    • localhost:3000/user/patch (PATCH) - assign role to user
      • Body format: { userUuid: 'someid', roleUuid: 'someid' }

  • Permission endpoints
    • localhost:3000/permission (GET) - get all permissions
    • localhost:3000/permission/post (POST) - create a permission
      • Body format: { name: 'CREATE' }
    • localhost:3000/permission/delete (DELETE) - delete a permission by uuid
      • Body format: { permissionUuid: 'someid' }

  • Role endpoints
    • localhost:3000/role (GET) - get all roles
    • localhost:3000/role/post (POST) - create a role
      • Body format: { name: 'Admin', permissionUuids: ['someid1', 'someid2']}
    • localhost:3000/role/patch (PATCH) - add new permission to role
      • Body format: { permissionUuid: 'someid', roleUuid: 'someid' }

About

Create users with roles, that include special permissions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published