feat(mssqldb): update remove_credentials to be the same as smbdb
parent
f9ff7cef7a
commit
38854a59e4
|
@ -217,12 +217,13 @@ class database:
|
||||||
"""
|
"""
|
||||||
Removes a credential ID from the database
|
Removes a credential ID from the database
|
||||||
"""
|
"""
|
||||||
|
del_hosts = []
|
||||||
for cred_id in creds_id:
|
for cred_id in creds_id:
|
||||||
self.conn.query(self.users_table).filter(
|
q = delete(self.UsersTable).filter(
|
||||||
self.users_table.c.id == cred_id
|
self.UsersTable.c.id == cred_id
|
||||||
).delete()
|
)
|
||||||
self.conn.commit()
|
del_hosts.append(q)
|
||||||
self.conn.close()
|
asyncio.run(self.conn.execute(q))
|
||||||
|
|
||||||
def add_admin_user(self, credtype, domain, username, password, host, user_id=None):
|
def add_admin_user(self, credtype, domain, username, password, host, user_id=None):
|
||||||
domain = domain.split('.')[0].upper()
|
domain = domain.split('.')[0].upper()
|
||||||
|
|
Loading…
Reference in New Issue