-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Currently, our permission system uses a 3-bit mask (ACCESS_BITS = 3), limiting us to only 8 different permission combinations. As our application grows, we need to support more granular permission controls.
Current implementation:
// Max bits count for access
export const ACCESS_BITS = 3;
// Mask for access bits
export const ACCESS_MASK = (1 << ACCESS_BITS) - 1;Proposed changes:
Increase ACCESS_BITS to a larger value (e.g., 5 or 8 or more) to support more permission types
Update any dependent code that relies on the current 3-bit mask
Update documentation to reflect the new permission structure
Impact: Increasing the bit count will allow us to define more permissions without architectural changes, making our access control system more flexible and future-proof.
Questions to consider:
Are there any performance implications?
Do we need to migrate existing permission data?
Should we consider a different permission model altogether?