-
Notifications
You must be signed in to change notification settings - Fork 7
Workspaces #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workspaces #150
Conversation
mergin/client.py
Outdated
if not self._server_type: | ||
try: | ||
resp = self.get("/config") | ||
config = json.load(resp) | ||
if "user_workspaces_allowed" in config: | ||
self._server_type = "ee" | ||
if "global_namespace" in config: | ||
self._server_type = "ce" | ||
self._global_namespace = config["global_namespace"] | ||
except ClientError as e: | ||
self._server_type = "old" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note for the future: /config
will return the type of the server explicitly without the need to guess it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me!
We will merge this one once we are ready for workspaces! 🥳 |
use new api for server_type and workspace services
def global_namespace(self):
will be redundant with the upcoming API changes as this info should be available by/workspaces
endpoint and CE and EE versions will be treated the same.