Skip to content

Releases: hdaklue/porter

2.0.12

Choose a tag to compare

@hdaklue hdaklue released this 21 Oct 14:06
Fix: error Invalid storage type: encrypted. Allowed: hashed, plain by…

2.0.11

Choose a tag to compare

@hdaklue hdaklue released this 04 Oct 14:09
Add role hierarchy comparison methods with equal-to conditions

- Add isHigherThanOrEqual method to RoleContract and HasRoleHierarchy
- Add getRolesLowerThanOrEqual and getRolesHigherThanOrEqual to RoleFactory
- Add comprehensive docblocks to all RoleFactory methods
- Improve return type declarations for consistency

2.0.10

Choose a tag to compare

@hdaklue hdaklue released this 03 Oct 10:55
Extract caching logic to dedicated RoleCacheManager

- Create new RoleCacheManager with all static methods for cache operations
- Move all cache-related methods from RoleManager to RoleCacheManager
- Reduce RoleManager from 778 to 610 lines (21.6% reduction)
- Improve separation of concerns: RoleManager handles business logic, RoleCacheManager handles caching
- Maintain 100% backward compatibility with existing public API
- All 243 tests passing with 1760 assertions

2.0.9

Choose a tag to compare

@hdaklue hdaklue released this 02 Oct 22:02
Fix role check cache invalidation for cross-session changes

- Replace clearRoleCheckCaches to iterate all registered roles
- Ensures both old and new role caches are cleared during role changes
- Fixes cache persistence issue across different user sessions
- Improves cache invalidation reliability for changeRoleOn operations

2.0.8

Choose a tag to compare

@hdaklue hdaklue released this 02 Oct 20:15
Refactor changeRoleOn method and fix cache invalidation

- Simplify changeRoleOn by reusing remove() and assign() methods
- Fix cache invalidation bug for role changes
- Update destroyTenantRoles return type from int to bool
- Fix multitenancy test to correctly enforce tenant integrity on role changes

2.0.7

Choose a tag to compare

@hdaklue hdaklue released this 02 Oct 19:12
Improve multitenancy validation for flexible cross-tenant assignments

- Allow users to be assigned to any tenant entity without restrictions
- Allow users with existing roles in a tenant to be assigned to any entity within that tenant
- Add noRoleInTenant() exception with clearer error messaging
- Update validation logic to check tenant participation via Roster table
- Refactor tests to validate new cross-tenant assignment behavior
- Update README to reflect smart tenant validation features

2.0.6

Choose a tag to compare

@hdaklue hdaklue released this 26 Sep 13:55
Add role translations and publishable translation support

- Add English and Arabic translation files for role labels and descriptions
- Update PorterServiceProvider to make translations publishable via porter-translations tag
- Add comprehensive translation tests covering both languages and fallback behavior
- Enable automatic translation loading from package lang directory

2.0.5

Choose a tag to compare

@hdaklue hdaklue released this 26 Sep 08:11
Add Laravel validation rules for role assignment validation

Features:
- NotAssignedTo rule: validates entity is not already assigned
- AssignedTo rule: validates entity has existing role assignment
- Comprehensive test suite with 18 tests covering edge cases
- Updated Laravel integration docs with validation examples
- Code formatted with Laravel Pint

Benefits:
- Prevents duplicate role assignments
- Validates existing assignments before operations
- Seamless Laravel validation system integration
- Type-safe using Porter entity contracts

2.0.4

Choose a tag to compare

@hdaklue hdaklue released this 15 Sep 23:25

Full Changelog: 2.0.3...2.0.4

2.0.3

Choose a tag to compare

@hdaklue hdaklue released this 15 Sep 22:53

Full Changelog: 2.0.2...2.0.3