Open itsthejoker opened 3 years ago
Thankfully, this is really easy and is just extending a little bit of the BlossomUser class: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom-permissions
Example:
class BlossomUser(...): class Meta: permissions = [ ("tor_expert", "Is recognized as an Expert and has extra abilities on the subreddit") ]
usage:
me = BlossomUser.objects.get(username="me") if me.has_perm("user.tor_expert"): do_stuff()
Thankfully, this is really easy and is just extending a little bit of the BlossomUser class: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom-permissions
Example:
usage: