def remove_group(self, select_user, group): self.database[select_user][1].remove(group) core.save_auth(self.database)
def add_group(self, select_user, group): self.database[select_user][1].append(group) core.save_auth(self.database)
def del_user(self, select_user): del self.database[select_user] core.save_auth(self.database)
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)
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)