Skip to content

Commit

Permalink
modules.admin: Restauration of changes that got deleted while merging…
Browse files Browse the repository at this point in the history
… from github
  • Loading branch information
msinn committed Jun 21, 2024
1 parent f63d421 commit f256f0b
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 14 deletions.
6 changes: 0 additions & 6 deletions modules/admin/api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import json
import cherrypy

from lib.module import Modules
import lib.shyaml as shyaml

from .rest import RESTResource
Expand Down Expand Up @@ -246,11 +245,6 @@ def update(self, id=None):
# update etc/module.yaml with data from admin frontend
self.module_confdata = shyaml.yaml_load_roundtrip(os.path.join(self.etc_dir, 'module.yaml'))
self.update_configdict(self.module_confdata['http'], data, 'http')
self.mod_http = Modules.get_instance().get_module('http')
hashed_password = data.get('http', {}).get('data', {}).get('hashed_password', '')
if hashed_password is None:
hashed_password = ''
self.mod_http._hashed_password = hashed_password
self.update_configdict(self.module_confdata['admin'], data, 'admin')

if self.module_confdata.get('websocket', None) is None:
Expand Down
3 changes: 0 additions & 3 deletions modules/admin/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ def root(self):
response = {}
response['default_language'] = self._sh.get_defaultlanguage()
response['client_ip'] = client_ip
http_user_dict = self.module.mod_http.get_user_dict()
response['login_required'] = http_user_dict.get('admin', {"password_hash": ""}).get("password_hash", "") != ""

return json.dumps(response)


Expand Down
Loading

0 comments on commit f256f0b

Please sign in to comment.