From 55c36a1123b160afdaff6630bb91816464dc0a8f Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Wed, 12 Nov 2014 08:49:11 +0100 Subject: [PATCH] [gen] Added UserWrapper.isSpecial that returns True fr special users (admin, system, anon). --- gen/wrappers/UserWrapper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gen/wrappers/UserWrapper.py b/gen/wrappers/UserWrapper.py index 74324d5..a417e3a 100644 --- a/gen/wrappers/UserWrapper.py +++ b/gen/wrappers/UserWrapper.py @@ -23,6 +23,8 @@ class UserWrapper(AbstractWrapper): href=":'%s/edit?page=passwords' % user.url">:_('change_password') ''') + def isSpecial(self): return self.login in self.specialUsers + def getTitle(self, normalized=False): '''Returns a nice name for this user, based on available information: name/first name or title or login. If p_normalized is True, special