diff --git a/app/lib/utils.py b/app/lib/utils.py index 881fddc..95eaa9c 100644 --- a/app/lib/utils.py +++ b/app/lib/utils.py @@ -30,12 +30,12 @@ def get_idp_data(): global idp_data, idp_timestamp lifetime = timedelta(minutes=app.config['SAML_METADATA_CACHE_LIFETIME']) if idp_timestamp+lifetime < datetime.now(): - background_thread = Thread(target=retreive_idp_data) + background_thread = Thread(target=retrieve_idp_data) background_thread.start() return idp_data -def retreive_idp_data(): +def retrieve_idp_data(): global idp_data, idp_timestamp if 'SAML_IDP_SSO_BINDING' in app.config: new_idp_data = OneLogin_Saml2_IdPMetadataParser.parse_remote(app.config['SAML_METADATA_URL'], entity_id=app.config.get('SAML_IDP_ENTITY_ID', None), required_sso_binding=app.config['SAML_IDP_SSO_BINDING']) @@ -44,9 +44,9 @@ def retreive_idp_data(): if new_idp_data is not None: idp_data = new_idp_data idp_timestamp = datetime.now() - print("SAML: IDP Metadata successfully retreived from: " + app.config['SAML_METADATA_URL']) + print("SAML: IDP Metadata successfully retrieved from: " + app.config['SAML_METADATA_URL']) else: - print("SAML: IDP Metadata could not be retreived") + print("SAML: IDP Metadata could not be retrieved") if 'TIMEOUT' in app.config.keys(): diff --git a/app/models.py b/app/models.py index 91331cf..2710080 100644 --- a/app/models.py +++ b/app/models.py @@ -102,7 +102,7 @@ class User(db.Model): return bcrypt.hashpw(pw.encode('utf-8'), bcrypt.gensalt()) def check_password(self, hashed_password): - # Check hased password. Useing bcrypt, the salt is saved into the hash itself + # Check hased password. Using bcrypt, the salt is saved into the hash itself if (self.plain_text_password): return bcrypt.checkpw(self.plain_text_password.encode('utf-8'), hashed_password.encode('utf-8')) return False @@ -440,7 +440,7 @@ class User(db.Model): def revoke_privilege(self): """ - Revoke all privielges from a user + Revoke all privileges from a user """ user = User.query.filter(User.username == self.username).first() @@ -452,7 +452,7 @@ class User(db.Model): return True except Exception as e: db.session.rollback() - logging.error('Cannot revoke user {0} privielges. DETAIL: {1}'.format(self.username, e)) + logging.error('Cannot revoke user {0} privileges. DETAIL: {1}'.format(self.username, e)) return False return False @@ -603,7 +603,7 @@ class Account(db.Model): db.session.commit() except Exception as e: db.session.rollback() - logging.error('Cannot revoke user privielges on account {0}. DETAIL: {1}'.format(self.name, e)) + logging.error('Cannot revoke user privileges on account {0}. DETAIL: {1}'.format(self.name, e)) try: for uid in added_ids: @@ -616,7 +616,7 @@ class Account(db.Model): def revoke_privileges_by_id(self, user_id): """ - Remove a single user from prigilege list based on user_id + Remove a single user from privilege list based on user_id """ new_uids = [u for u in self.get_user() if u != user_id] users = [] @@ -635,7 +635,7 @@ class Account(db.Model): return True except Exception as e: db.session.rollback() - logging.error('Cannot add user privielges on account {0}. DETAIL: {1}'.format(self.name, e)) + logging.error('Cannot add user privileges on account {0}. DETAIL: {1}'.format(self.name, e)) return False def remove_user(self, user): @@ -648,7 +648,7 @@ class Account(db.Model): return True except Exception as e: db.session.rollback() - logging.error('Cannot revoke user privielges on account {0}. DETAIL: {1}'.format(self.name, e)) + logging.error('Cannot revoke user privileges on account {0}. DETAIL: {1}'.format(self.name, e)) return False @@ -972,7 +972,7 @@ class Domain(db.Model): if 0 != len(domain_users): self.name = domain_reverse_name self.grant_privileges(domain_users) - return {'status': 'ok', 'msg': 'New reverse lookup domain created with granted privilages'} + return {'status': 'ok', 'msg': 'New reverse lookup domain created with granted privileges'} return {'status': 'ok', 'msg': 'New reverse lookup domain created without users'} return {'status': 'ok', 'msg': 'Reverse lookup domain already exists'} @@ -1037,7 +1037,7 @@ class Domain(db.Model): db.session.commit() except Exception as e: db.session.rollback() - logging.error('Cannot revoke user privielges on domain {0}. DETAIL: {1}'.format(self.name, e)) + logging.error('Cannot revoke user privileges on domain {0}. DETAIL: {1}'.format(self.name, e)) try: for uid in added_ids: @@ -1046,7 +1046,7 @@ class Domain(db.Model): db.session.commit() except Exception as e: db.session.rollback() - logging.error('Cannot grant user privielges to domain {0}. DETAIL: {1}'.format(self.name, e)) + logging.error('Cannot grant user privileges to domain {0}. DETAIL: {1}'.format(self.name, e)) def update_from_master(self, domain_name): """ diff --git a/app/static/custom/js/custom.js b/app/static/custom/js/custom.js index dd89d0e..d30cebe 100644 --- a/app/static/custom/js/custom.js +++ b/app/static/custom/js/custom.js @@ -129,7 +129,7 @@ function editRow(oTable, nRow) { jqTds[5].innerHTML = ''; jqTds[6].innerHTML = ''; - // set current value of dropdows column + // set current value of dropdown column if (aData[2] == 'Active'){ isDisabled = 'false'; } diff --git a/app/templates/admin_manageuser.html b/app/templates/admin_manageuser.html index b9a446c..2c8c3c4 100644 --- a/app/templates/admin_manageuser.html +++ b/app/templates/admin_manageuser.html @@ -104,7 +104,7 @@ var info = "Are you sure you want to revoke all privileges for " + username + ". They will not able to access any domain."; modal.find('.modal-body p').text(info); modal.find('#button_revoke_confirm').click(function() { - var postdata = {'action': 'revoke_user_privielges', 'data': username} + var postdata = {'action': 'revoke_user_privileges', 'data': username} applyChanges(postdata, $SCRIPT_ROOT + '/admin/manageuser'); modal.modal('hide'); }) diff --git a/app/templates/admin_setting_authentication.html b/app/templates/admin_setting_authentication.html index e522178..87c06a2 100644 --- a/app/templates/admin_setting_authentication.html +++ b/app/templates/admin_setting_authentication.html @@ -413,7 +413,7 @@ } }); - // init validation reqirement at first time page load + // init validation requirement at first time page load {% if SETTING.get('ldap_enabled') %} $('#ldap_uri').prop('required', true); $('#ldap_base_dn').prop('required', true); @@ -453,7 +453,7 @@ } }); - // init validation reqirement at first time page load + // init validation requirement at first time page load {% if SETTING.get('google_oauth_enabled') %} $('#google_oauth_client_id').prop('required', true); $('#google_oauth_client_secret').prop('required', true); @@ -488,7 +488,7 @@ } }); - // init validation reqirement at first time page load + // init validation requirement at first time page load {% if SETTING.get('google_oauth_enabled') %} $('#github_oauth_key').prop('required', true); $('#github_oauth_secret').prop('required', true); diff --git a/app/templates/admin_setting_pdns.html b/app/templates/admin_setting_pdns.html index 3310680..ce44b48 100644 --- a/app/templates/admin_setting_pdns.html +++ b/app/templates/admin_setting_pdns.html @@ -63,7 +63,7 @@
-

You must configure the API connection information before PowerDNS-Admiin can query your PowerDNS data. Following fields are required:

+

You must configure the API connection information before PowerDNS-Admin can query your PowerDNS data. Following fields are required:

PDNS API URL
Your PowerDNS API URL (eg. http://127.0.0.1:8081/).
PDNS API KEY
diff --git a/app/templates/user_profile.html b/app/templates/user_profile.html index 90e9706..d32236f 100644 --- a/app/templates/user_profile.html +++ b/app/templates/user_profile.html @@ -137,7 +137,7 @@ {% endblock %} {% block extrascripts %} - +