Beispiel #1
0
 def __init__(self, request):
     """ Initialize OpenID settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("OpenID server")
Beispiel #2
0
 def __init__(self, request):
     """ Initialize user settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     self.title = self._("Notification")
     self.name = 'notification'
Beispiel #3
0
 def __init__(self, request):
     """ Initialize OpenID settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("OpenID server")
Beispiel #4
0
 def __init__(self, request):
     """ Initialize user settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     self.title = self._("Notification")
     self.name = 'notification'
Beispiel #5
0
 def __init__(self, request):
     """ Initialize user settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("Preferences")
     self.name = 'prefs'
Beispiel #6
0
 def __init__(self, request):
     """ Initialize setuid settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("Switch user")
     self.name = 'suid'
Beispiel #7
0
 def __init__(self, request):
     """ Initialize user settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("Preferences")
     self.name = 'prefs'
Beispiel #8
0
 def __init__(self, request):
     """ Initialize setuid settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("Switch user")
     self.name = 'suid'
Beispiel #9
0
 def __init__(self, request):
     """ Initialize password change form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     _ = request.getText
     self.cfg = request.cfg
     self.title = _("Change password")
     self.name = 'changepass'
Beispiel #10
0
 def __init__(self, request):
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     self.user = request.user
     self.theme = request.theme
     self.name = 'themeprefs'
     self.title = self._('Theme preferences')
     self.fields = self._seek_fields()
Beispiel #11
0
 def __init__(self, request):
     """ Initialize OpenID settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("OpenID settings")
     openid_auth = False
     if not _openid_disabled:
         for authm in self.request.cfg.auth:
             if isinstance(authm, OpenIDAuth):
                 openid_auth = True
                 break
     if not openid_auth:
         self.allowed = lambda: False
Beispiel #12
0
 def allowed(self):
     return (
         not "password" in self.cfg.user_form_remove
         and not "password" in self.cfg.user_form_disable
         and UserPrefBase.allowed(self)
         and not "password" in self.request.user.auth_attribs
     )
Beispiel #13
0
 def __init__(self, request):
     """ Initialize OpenID settings form. """
     UserPrefBase.__init__(self, request)
     self.request = request
     self._ = request.getText
     self.cfg = request.cfg
     _ = self._
     self.title = _("OpenID settings")
     openid_auth = False
     if not _openid_disabled:
         for authm in self.request.cfg.auth:
             if isinstance(authm, OpenIDAuth):
                 openid_auth = True
                 break
     if not openid_auth:
         self.allowed = lambda: False
Beispiel #14
0
 def __init__(self, request):
     UserPrefBase.__init__(self, request)
     self.request = request
     self.cfg = request.cfg
     self.title = "View sessions"
     self.name = 'sessions'
Beispiel #15
0
 def allowed(self):
     return UserPrefBase.allowed(self) and self.fields != []
Beispiel #16
0
 def allowed(self):
     return (UserPrefBase.allowed(self) and
             self.request.user.isSuperUser() or
             (not self.request._setuid_real_user is None and
              (self.request._setuid_real_user.isSuperUser())))
Beispiel #17
0
 def allowed(self):
     return UserPrefBase.allowed(self) and (self.cfg.mail_enabled
                                            or self.cfg.jabber_enabled)
Beispiel #18
0
 def allowed(self):
     return (self.request.user.auth_method
             in self.request.cfg.auth_can_logout
             and UserPrefBase.allowed(self)
             and self.request.user.isSuperUser())
Beispiel #19
0
 def allowed(self):
     return UserPrefBase.allowed(self) and (
         self.cfg.mail_enabled or self.cfg.jabber_enabled)
Beispiel #20
0
 def allowed(self):
     return (
         self.request.user.auth_method in self.request.cfg.auth_can_logout
         and UserPrefBase.allowed(self)
         and self.request.user.isSuperUser()
     )
Beispiel #21
0
 def allowed(self):
     return (not 'password' in self.cfg.user_form_remove and
             not 'password' in self.cfg.user_form_disable and
             UserPrefBase.allowed(self) and
             not 'password' in self.request.user.auth_attribs)