-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Organizations: Organization chooser page #10325
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
Conversation
Writing some more test cases but almost done... |
Added more testing. |
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.
I'm quite excited we're taking this change on, I've wanted it for a while! I feel like this is close, but would be very close for merge without the decorator change.
readthedocs/organizations/templates/organizations/organization_choose.html
Outdated
Show resolved
Hide resolved
readthedocs/organizations/templates/organizations/organization_choose.html
Outdated
Show resolved
Hide resolved
readthedocs/organizations/templates/organizations/organization_choose.html
Outdated
Show resolved
Hide resolved
…_choose.html Co-authored-by: Anthony <[email protected]>
readthedocs/organizations/templates/organizations/organization_choose.html
Show resolved
Hide resolved
…mit. If we want to re-introduce the feature, this commit can be reverted.
8ef2a8c
to
15c428e
Compare
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.
Looks great! 👍
…ganization-chooser-redirect
…ganization-chooser-redirect
…s/readthedocs.org into organization-chooser-redirect
Fixes https://github.com/readthedocs/readthedocs-corporate/issues/938
If the user has exactly
1
organization, the organization chooser will automatically redirect to the requested page with theslug
path argument replaced with the slug of the user's single organization.If the user has
>1
or zero organizations, visiting the organization chooser displays a list of the requested view name with URLs for each organization's slug. Notice how the organization chooser page takes the urlconf name as a URL parameternext_name
. It can also handlenext_querystring
.TODO
Removed
This PR is no longer titled "Support URL scheme for unspecific organization w/ chooser page or automatic redirect"
This change allows URLs to be specified without knowledge of an organization's slug, moreover in cases where a user has more than 1 organization.
Allowing such URLs means easy reuse of email templates.
A reusable URL for organization-specific pages uses
-
as the slug.The URL for different organization pages look like this:
devthedocs.com/organizations/-/
devthedocs.com/organizations/-/members/
devthedocs.com/organizations/-/subscription/