Пример #1
0
 def activate(self):
     """Activate the user"""
     audit('activate user', self.username)
     self.status = 'A'
     self.updated_by = zoom.system.user.user_id
     self.updated = zoom.tools.now()
     self.save()
Пример #2
0
 def before_delete(self, user):
     """Things to do immediately before deleting a user"""
     user.remove_groups()
     audit('delete user', user.username)
Пример #3
0
 def after_insert(self, user):
     """Things to do immediately after inserting a new user"""
     user.remove_groups()  # avoid accidental authourizations
     user.add_group('users')
     audit('create user', user.username)
Пример #4
0
 def after_update(self, user):
     """Things to do immediately after a user update"""
     audit('update user', user.username)