You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Django's permissions is objects based and uses the ContentType framework which isn't terribly performant and requires a row per object or something terrible like that. A simple implementation would be using class_function namespacing in a class as an attribute to refer to pyapi calls, and have those attribute return True or False using a backend call like has_perms.
backend api sketch:
has_perms('method', user)
get_perms('method', user)
@check_perms decorator to dynamically send method names and user from the call using .__name__ and .im_class.__name__ on the wrapped function
Django's permissions is objects based and uses the ContentType framework which isn't terribly performant and requires a row per object or something terrible like that. A simple implementation would be using class_function namespacing in a class as an attribute to refer to pyapi calls, and have those attribute return True or False using a backend call like has_perms.
backend api sketch:
has_perms('method', user)
get_perms('method', user)
@check_perms decorator to dynamically send method names and user from the call using
.__name__
and.im_class.__name__
on the wrapped functionsketch implementation:
The text was updated successfully, but these errors were encountered: