Skip to content

[Feature Request] Add support for bitwise operators in access policies #2023

@sanny-io

Description

@sanny-io

Is your feature request related to a problem? Please describe.
I'm using bitflags for a permission system, but I can't tie that in with Zenstack's access policies without bitwise operators.

Describe the solution you'd like
The ability to use bitwise operators like &, |, ~, etc.

Describe alternatives you've considered
I've tried granting permissions as individual rows, but it's much more unwieldy compared to having all of the permissions encoded into a single column.

Additional context
Ideally, it would work with any numeric column type. Bitflags in particular can get quite large. I'm using BigInt

Also, I want to express my gratitude for the work you guys do. I just sponsored the project, but it wouldn't let me include a message to say thanks :<

Zenstack is awesome, and you are amazing maintainers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions