Account: add a dashboard url endpoint.

This lets servers share a dashboard url with clients so that they in
turn can present clients with a settings dashboard.
We currently use it on the main server, but self-hosted servers may
also benefit from it for letting users manage some of their settings
(e.g. 2FA).
This commit is contained in:
Tom Hacohen
2020-10-08 21:03:54 +03:00
parent 9152e6f42d
commit 74f40abc65
2 changed files with 19 additions and 0 deletions

View File

@@ -61,6 +61,13 @@ class AppSettings:
return self.import_from_str(func)
return None
@cached_property
def DASHBOARD_URL_FUNC(self): # pylint: disable=invalid-name
func = self._setting("DASHBOARD_URL_FUNC", None)
if func is not None:
return self.import_from_str(func)
return None
@cached_property
def CHUNK_PATH_FUNC(self): # pylint: disable=invalid-name
func = self._setting("CHUNK_PATH_FUNC", None)