summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-30 12:56:45 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-30 12:56:45 +0200
commitd0a34067c983b7dfb4261cd2c6a39eb82e232b6f (patch)
tree777c1bae5cb62b2f33fc237e5abef4a6ee368359 /ishtar_common
parent76b54a02373d58b630b3be4a76d6b6857806e3e2 (diff)
downloadIshtar-d0a34067c983b7dfb4261cd2c6a39eb82e232b6f.tar.bz2
Ishtar-d0a34067c983b7dfb4261cd2c6a39eb82e232b6f.zip
Permissions: add missing permissions for authors and sources (refs #2068)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 6a9f86569..048af1294 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2844,6 +2844,7 @@ IshtarUser._meta.get_field('password').help_text = _(
class AuthorType(GeneralType):
order = models.IntegerField(_(u"Order"), default=1)
+
class Meta:
verbose_name = _(u"Author type")
verbose_name_plural = _(u"Author types")
@@ -2861,6 +2862,18 @@ class Author(models.Model):
verbose_name = _(u"Author")
verbose_name_plural = _(u"Authors")
ordering = ('author_type__order', 'person__name')
+ permissions = (
+ ("view_author",
+ ugettext(u"Can view all Authors")),
+ ("view_own_author",
+ ugettext(u"Can view own Author")),
+ ("add_own_author",
+ ugettext(u"Can add own Author")),
+ ("change_own_author",
+ ugettext(u"Can change own Author")),
+ ("delete_own_author",
+ ugettext(u"Can delete own Author")),
+ )
def __unicode__(self):
return unicode(self.person) + settings.JOINT + \