Example #1
0
 def remove_group(self, select_user, group):
     self.database[select_user][1].remove(group)
     core.save_auth(self.database)
Example #2
0
 def add_group(self, select_user, group):
     self.database[select_user][1].append(group)
     core.save_auth(self.database)
Example #3
0
 def del_user(self, select_user):
     del self.database[select_user]
     core.save_auth(self.database)
Example #4
0
 def reset_password(self, select_user, new_password):
     hashed_password = bcrypt.hashpw(new_password+core.SECRET_KEY, bcrypt.gensalt())
     self.database[select_user][0] = hashed_password
     core.save_auth(self.database)
Example #5
0
 def add_user(self, new_user, new_password, group):
     hashed_password = bcrypt.hashpw(new_password+core.SECRET_KEY, bcrypt.gensalt())
     self.database[new_user] = ['0', ['1']]
     self.database[new_user][0] = hashed_password
     self.database[new_user][1][0] = group
     core.save_auth(self.database)