What is Nostr?
Carlton Gibson 🇪🇺 /
npub1c7m…aywn
2025-01-16 10:02:20
in reply to nevent1q…lcmj

Carlton Gibson 🇪🇺 on Nostr: nprofile1q…9yhuh Then for role based permissions, there’s two parts: a check, and ...

nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqz2kha925s2rargfg79u33pkd67z73dny69fy7fsp6mlne94ctz5sc9yhuh (nprofile…yhuh) Then for role based permissions, there’s two parts: a check, and when you do it.

For the check, I tend to write custom functions per model, since I find the relation to a role SO app specific.

nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq32p606uwaug5snc82px2qx2n68nvwrlyqjm5dq2k706u0vxjwkfqacfkc9 (nprofile…fkc9) (🎩) has a good post of a named permission type approach that’s worth a read:

https://406.ch/writing/keep-content-managers-admin-access-up-to-date-with-role-based-permissions/

django-guardian is the old beast in the space for row-level permissions (but I’ve never got on with it TBH)

2/3 🤦
Author Public Key
npub1c7ma8te4u7wnmf6xh0x4w64uphdfpy0e80z752jm02v6m8dl3gqsd4aywn