Implement hashing bypass for groups
This commit is contained in:
@@ -104,15 +104,12 @@ class ContentBlock(models.Model):
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class Role(models.Model):
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
description = models.CharField(max_length=1024, null=True, blank=True)
|
||||
permission = models.CharField(max_length=255)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class ContentPermission(models.Model):
|
||||
inherit = models.ForeignKey("self", null=True, blank=True, on_delete=models.PROTECT)
|
||||
roles = models.ManyToManyField(Role, blank=True)
|
||||
class Perms(models.Model):
|
||||
class Meta:
|
||||
permissions = (
|
||||
("bypass_hashing", "Can bypass field hashing"),
|
||||
("bypass_blacklist", "Can bypass the blacklist"),
|
||||
("bypass_encryption", "Can bypass field encryption"),
|
||||
("post_irc", "Can post to IRC"),
|
||||
("post_discord", "Can post to Discord"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user