diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index a3c3ba575..6021d5fa8 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2056,6 +2056,8 @@ class Person(Address, Merge, OwnPerms, ValueGetter): ) TABLE_COLS = ('name', 'surname', 'raw_name', 'email', 'person_types_list', 'attached_to') + SHOW_URL = 'show-person' + MODIFY_URL = 'person_modify' title = models.CharField(_(u"Title"), max_length=100, choices=TYPE, blank=True, null=True) surname = models.CharField(_(u"Surname"), max_length=50, blank=True, @@ -2236,7 +2238,7 @@ class IshtarUser(User): def full_label(self): return self.person.full_label() - def has_perm(self, perm, model=None, session=None): + def has_perm(self, perm, model=None, session=None, obj=None): if not session: return super(IshtarUser, self).has_perm(perm, model) cache_key = 'usersession-{}-{}'.format(session.session_key, perm, @@ -2244,7 +2246,7 @@ class IshtarUser(User): res = cache.get(cache_key) if res in (True, False): return res - res = super(IshtarUser, self).has_perm(perm, model) + res = super(IshtarUser, self).has_perm(perm, obj) cache.set(cache_key, res, settings.CACHE_SMALLTIMEOUT) return res |