adjust registered by to managed by on db aslo remove url and api key on adding sites for gm
This commit is contained in:
1 parent
64b37b6b6d
commit
521f36d22d
15 files changed
+112
-75
No files matched your search
@@ -11,12 +11,12 @@ from apps.sync.models import ActiveSite
|
||||
|
||||
|
||||
def _gm_visible_site(*, owner: User, site_name: str, code: str) -> Site:
|
||||
"""GM scope only sees sites linked to an ActiveSite they registered."""
|
||||
"""GM scope only sees sites linked to an ActiveSite they manage."""
|
||||
active_site = ActiveSite.objects.create(
|
||||
code=code,
|
||||
name=site_name,
|
||||
api_base_url=f"https://{code}.example/api/v1",
|
||||
registered_by=owner,
|
||||
managed_by=owner,
|
||||
)
|
||||
return Site.objects.create(
|
||||
site_name=site_name, user=owner, active_site=active_site
|
||||
|
||||
Reference in new issue
Block a user