mirror of
https://github.com/maubot/maubot
synced 2025-08-29 08:50:38 +00:00
Add config option to disable parts of management API
This commit is contained in:
parent
147081c0db
commit
75b5ac8ebd
17 changed files with 287 additions and 149 deletions
|
@ -56,6 +56,16 @@ class Config(BaseFileConfig):
|
|||
password = self._new_token()
|
||||
base["admins"][username] = bcrypt.hashpw(password.encode("utf-8"),
|
||||
bcrypt.gensalt()).decode("utf-8")
|
||||
copy("api_features.login")
|
||||
copy("api_features.plugin")
|
||||
copy("api_features.plugin_upload")
|
||||
copy("api_features.instance")
|
||||
copy("api_features.instance_database")
|
||||
copy("api_features.client")
|
||||
copy("api_features.client_proxy")
|
||||
copy("api_features.client_auth")
|
||||
copy("api_features.dev_open")
|
||||
copy("api_features.log")
|
||||
copy("logging")
|
||||
|
||||
def is_admin(self, user: str) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue