dyne / starters

📐 Projects template starters of Dyne.org
5 stars 1 forks source link

Add `level` to `OrgAuthorizations` for easier checks (?) #269

Open bbtgnn opened 10 months ago

bbtgnn commented 10 months ago

Instead of doing every time auth.name == "admin" || auth.name == "owner" we could do auth.level <= 1 (owner.level = 0, admin.level = 1)

I think this could be more flexible

puria commented 10 months ago

I rememeber we already discussed, this, no? bitwise operator, unix like... to create hierarchy on the roles... get inspired by https://dev.to/jannisdev/build-a-bitwise-permission-system-ocl

bbtgnn commented 10 months ago

The thing is, we can’t use bitwise operations in pocketbase api rules

Il giorno sab 28 ott 2023 alle 10:16 Puria Nafisi Azizi < @.***> ha scritto:

I rememeber we already discussed, this, no? bitwise operator, unix like... to create hierarchy on the roles... get inspired by https://dev.to/jannisdev/build-a-bitwise-permission-system-ocl

— Reply to this email directly, view it on GitHub https://github.com/dyne/starters/issues/269#issuecomment-1783744332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHJH2NEKTFMUHTUFASVW4MLYBS5MNAVCNFSM6AAAAAA6SNCQP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTG42DIMZTGI . You are receiving this because you authored the thread.Message ID: @.***>