Skip to content

Increase ACCESS_BITS limit to support more permission types #9

@productdevbook

Description

@productdevbook

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions