Skip to content

Latest commit

 

History

History
70 lines (62 loc) · 2.86 KB

File metadata and controls

70 lines (62 loc) · 2.86 KB

Changelog

All notable changes to kiurd/role-based-access-control will be documented in this file.

[Unreleased]

v1.0.0 - 2025-01-XX

Added

  • Initial release with comprehensive RBAC system
  • Auto-discovery of permissions from controllers and routes
  • Global middleware for automatic permission enforcement (zero-code setup)
  • Complete REST API for dynamic permission management
  • Artisan commands for role and permission management:
    • permissions:sync - Auto-discover and sync permissions
    • role:create - Create roles
    • role:assign-permission - Assign single permission
    • role:assign-all-permissions - Bulk assign permissions with filters
    • role:show - View role details, permissions, and users
    • user:show - View user's roles and permissions
    • module:show - View module's actions and roles
    • permissions:list - List permissions with filters
  • Module + Action based permission architecture
  • Multi-guard support (web, api, etc.)
  • Trait-based integration (HasRolesAndPermissions)
  • Multiple middleware options:
    • permission.global - Auto-enforce on all routes
    • permission.auto - Auto-discover and check
    • permission - Manual permission check
    • permission.check - Method-based checking
  • Helper classes for programmatic permission management
  • Super admin role support (bypass all checks)
  • Permission caching with auto-update webhooks
  • Comprehensive documentation:
    • README.md - Complete usage guide
    • DYNAMIC_SETUP.md - Zero-code setup guide
    • COMMANDS_REFERENCE.md - CLI command reference
    • PUBLISHING_GUIDE.md - Packagist publishing guide
  • Database migrations with proper indexes and constraints
  • Service provider with auto-discovery
  • Facade support
  • Config file for full customization

Features

  • Zero-Code Setup: Enable global middleware, all routes protected automatically
  • Auto-Discovery: Scans controllers and creates permissions automatically
  • Bulk Operations: Assign all permissions to a role at once with filters
  • Dynamic Management: Create/assign/revoke permissions without code changes
  • Complete Visibility: View all relationships (user→role→permission→module)
  • Flexible Filtering: Filter by module, action, role, guard
  • Beautiful CLI: Color-coded output with tables and emojis
  • Production Ready: Tested, documented, and optimized

Database Schema

  • roles - User roles
  • modules - Resource modules (users, posts, etc.)
  • actions - Operations (create, read, update, delete, etc.)
  • permissions - Junction of modules and actions
  • role_permissions - Role-permission assignments
  • user_roles - User-role assignments

Compatibility

  • PHP 8.0, 8.1, 8.2, 8.3
  • Laravel 9.x, 10.x, 11.x
  • MySQL, PostgreSQL, SQLite

Notes

  • This is the initial stable release
  • All features are tested and production-ready
  • Full backward compatibility will be maintained for 1.x versions