Implement a way to get the current scope
References: #395 (closed), #486 (closed), #488 (closed), permission design blueprint.
We currently use the URL namespace to get the current Workspace to use as context for further operation, and with Workspaces getting namespaced inside Scopes, this is no longer sufficient.
We need to design a way to get the Scope for a request.
A clean way is to add an extra prefix in the URL namespace, which may require some drudge work in adapting urls.py
and {% url %}
, which could be an opportunity for some clever refactoring of url generation.
Alternatively one could introduce the concept of "current scope" and add it to the Django session, or to the User field, and implement views for switching between scopes.
There are likely other options: this issue may need a bit of preliminary design work.
(report time in #395 (closed))