mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-29 05:04:38 +00:00
Fix missing import
This commit is contained in:
parent
7f8ae003fc
commit
e1c0b4a1b4
@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import base64
|
import base64
|
||||||
import bcrypt
|
import bcrypt
|
||||||
|
import traceback
|
||||||
import pyotp
|
import pyotp
|
||||||
import ldap
|
import ldap
|
||||||
import ldap.filter
|
import ldap.filter
|
||||||
@ -398,28 +399,6 @@ class User(db.Model):
|
|||||||
current_app.logger.error('Unsupported authentication method')
|
current_app.logger.error('Unsupported authentication method')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# def get_apikeys(self, domain_name=None):
|
|
||||||
# info = []
|
|
||||||
# apikey_query = db.session.query(ApiKey) \
|
|
||||||
# .join(Domain.apikeys) \
|
|
||||||
# .outerjoin(DomainUser, Domain.id == DomainUser.domain_id) \
|
|
||||||
# .outerjoin(Account, Domain.account_id == Account.id) \
|
|
||||||
# .outerjoin(AccountUser, Account.id == AccountUser.account_id) \
|
|
||||||
# .filter(
|
|
||||||
# db.or_(
|
|
||||||
# DomainUser.user_id == User.id,
|
|
||||||
# AccountUser.user_id == User.id
|
|
||||||
# )
|
|
||||||
# ) \
|
|
||||||
# .filter(User.id == self.id)
|
|
||||||
|
|
||||||
# if domain_name:
|
|
||||||
# info = apikey_query.filter(Domain.name == domain_name).all()
|
|
||||||
# else:
|
|
||||||
# info = apikey_query.all()
|
|
||||||
|
|
||||||
# return info
|
|
||||||
|
|
||||||
def create_user(self):
|
def create_user(self):
|
||||||
"""
|
"""
|
||||||
If user logged in successfully via LDAP in the first time
|
If user logged in successfully via LDAP in the first time
|
||||||
|
Loading…
x
Reference in New Issue
Block a user