Skip to content

Mahmoudtarek24/Permission-Based-Authorization-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Permission-Based Authorization System

📋 Overview

ASP.NET Core Web API project that simulates the advanced permission management system found in ASP.NET Identity, with additional features for managing permissions at the individual user level.

🎯 Project Goals

  • Complete simulation of core ASP.NET Identity tables
  • Implementation of an advanced permission system that supports:
    • Role-based permissions
    • User-specific permissions
    • Ability to add or remove specific permissions for individual users

🗄️ Database Structure

Core Tables (Identity Simulation):

  • Users - Users table
  • Roles - Roles table
  • UserRoles - User-Role relationship table
  • Permissions - Permissions table
  • RolePermissions - Role-Permission relationship table
  • UserPermissions - Additional/removed permissions at user level

Additional Features:

  • System Roles: Protected roles that cannot be deleted
  • System Permissions: Core system permissions

🔧 Technologies Used

  • ASP.NET Core 8.0 - Web API Framework
  • Entity Framework Core - ORM for database operations
  • JWT Authentication - Authentication system
  • Custom Authorization Handlers - Custom permission handlers

🚀 Key Features

1. User Management

  • Create, update, delete users
  • Enable/disable users
  • Assign multiple roles to a single user

2. Role Management

  • Create custom roles
  • Link permissions to roles
  • Protect system roles from deletion

3. Permission Management

  • Hierarchical permission system (Module.Action)
  • Ability to add new permissions
  • Group permissions by module

4. Flexible Permissions

  • Role-based Permissions: Users inherit permissions from their roles
  • Additional Permissions: Grant extra permissions to specific users
  • Revoked Permissions: Remove specific permissions from users even if they have them through roles

📚 API Documentation

The system provides comprehensive REST API endpoints organized into different controllers: Screenshot 2025-07-24 103032

Screenshot 2025-07-24 103043

About

ASP.NET Core Web API simulating Identity system with advanced role-based and user-specific permissions management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages