Example #1
0
 def reset(self, login, code, password):
     auth = getUtility(IAuthentication)
     pf = auth[u'principalfolder']
     if login in pf:
         principal_id = pf.prefix + login
         data = self.requests.get(code)
         if data and data['id'] == principal_id:
             ip = internal_principal(principal_id)
             ip.setPassword(password, "SSHA")
             notify(PasswordResetEvent(principal_id, password))
Example #2
0
 def reset(self, login, code, password):
     auth = getUtility(IAuthentication)
     pf = auth[u'principalfolder']
     if login in pf:
         principal_id = pf.prefix + login
         data = self.requests.get(code)
         if data and data['id'] == principal_id:
             ip = internal_principal(principal_id)
             ip.setPassword(password, "SSHA")
             notify(PasswordResetEvent(principal_id, password))
Example #3
0
    def update(self):
        old = self.request.get('old') 
        new = self.request.get('new')

        if old and new:
            ip = internal_principal(self.request.principal.id)

            if ip.checkPassword(old):
                ip.setPassword(new, "SSHA")
                self.status = u"Password successfully updated"
            else:
                self.status = u"Wrong old password"
Example #4
0
    def update(self):
        old = self.request.get('old')
        new = self.request.get('new')

        if old and new:
            ip = internal_principal(self.request.principal.id)

            if ip.checkPassword(old):
                ip.setPassword(new, "SSHA")
                self.status = u"Password successfully updated"
            else:
                self.status = u"Wrong old password"
Example #5
0
    def name(self, v):
        self.annotations['name'] = v

        # for principalfolder search
        ip = internal_principal(self.principal.id)
        ip.title = v
Example #6
0
    def name(self, v):
        self.annotations['name'] = v

        # for principalfolder search
        ip = internal_principal(self.principal.id)
        ip.title = v