An open API service indexing awesome lists of open source software.

https://github.com/aasif-iqbal/role-based-access-control

RBAC (Role-Based Access Control) is a security model used to manage user permissions by assigning roles to users. Each role has a set of predefined permissions, and users inherit these permissions based on their assigned roles.
https://github.com/aasif-iqbal/role-based-access-control

expressjs javascript joi-validation jwt-authentication middleware mongo moongose rest-api tyoescript

Last synced: 20 days ago
JSON representation

RBAC (Role-Based Access Control) is a security model used to manage user permissions by assigning roles to users. Each role has a set of predefined permissions, and users inherit these permissions based on their assigned roles.

Awesome Lists containing this project

README

        

# Role Based Access Control
RBAC (Role-Based Access Control) is a security model used to manage user permissions by assigning roles to users. Each role has a set of predefined permissions, and users inherit these permissions based on their assigned roles. This approach simplifies permission management and ensures that users can access only the resources they are authorized to use.

In short:
- Roles define permissions.
- Users are assigned to roles.
- Access is granted based on the roles.

---

## How to start project
1. git clone
2. cd backend
- npm install
- npm install typescript ts-node @types/node --save-dev
- npm run build
- npm start
- npm run start:dev (nodemon)

---

## Project Directory Structure
```
└── πŸ“backend
└── πŸ“src
└── app.ts
└── πŸ“config
└── db.ts
└── πŸ“controllers
└── categories.ts
└── comments.ts
└── likes.ts
└── permissions.ts
└── posts.ts
└── roles.ts
└── routePermissions.ts
└── userPermissions.ts
└── users.ts
└── πŸ“helpers
└── routePermissionHelper.ts
└── userPermissionHelper.ts
└── index.ts
└── πŸ“middlewares
└── authenticate.ts
└── checkPermission.ts
└── onlyAdminAccess.ts
└── πŸ“validators
└── category.ts
└── comment.ts
└── like.ts
└── login.ts
└── permission.ts
└── post.ts
└── role.ts
└── routePermissions.ts
└── user.ts
└── userPermission.ts
└── πŸ“models
└── categories.ts
└── comments.ts
└── likes.ts
└── permissions.ts
└── posts.ts
└── roles.ts
└── router-permissions.ts
└── user-permissions.ts
└── users.ts
└── πŸ“routes
└── category.ts
└── comment.ts
└── index.ts
└── like.ts
└── permission.ts
└── post.ts
└── role.ts
└── routePermissions.ts
└── user.ts
└── userPermissions.ts
└── πŸ“services
└── authService.ts
└── mailService.ts
└── πŸ“types
└── authenticated-request.ts
└── express.d.ts
└── πŸ“utils
└── getRoutes.ts
└── interfaces.d.ts
└── .env
└── .env-example
└── .gitignore
└── nodemon.json
└── package-lock.json
└── package.json
└── tsconfig.json
```