-
Notifications
You must be signed in to change notification settings - Fork 0
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
Move Backends to this repo #21
Conversation
@OmarIthawi please ignore things related to #12. I'll create a new PR for that. Or do you prefer resolving that here? |
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.
@shadinaif Thanks for making the migration. Overall this is a good (yeah, ignore the cosmetic comments).
I have few changes on the backend implementation on assuming multi-orgs per user.
I think the changes are minor but important to have.
24db494
to
1f4bec4
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! Thanks @shadinaif!
One thing we may want to change is fail_if_inactive=True
.
I hope it doesn't make you unhappy, but we actually never use the is_active
and it's always True
. But we may need it in the near future.
tahoe_sites/backends.py
Outdated
site = get_current_site() | ||
if not is_main_site(site) and user and not user.is_superuser: | ||
try: | ||
user_organizations = get_organization_for_user(user=user, fail_if_inactive=False) |
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.
This is unrelated to https://github.com/appsembler/edx-organizations/blob/3708d65456e70328383fecae03bb48666f20e405/organizations/backends.py#L44
We have more than one is_active
and we probably should remove this field after this feature is in production.
non-required:
user_organizations = get_organization_for_user(user=user, fail_if_inactive=False) | |
user_organizations = get_organization_for_user(user=user, fail_if_inactive=True) |
See:
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.
To be fixed later as described above
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.
This should be kept as it is because the issue is fixed in #31
1f4bec4
to
33c9fc5
Compare
@shadinaif this pull request seems like it's ready to be merged. Anything blocking it? |
33c9fc5
to
aeca194
Compare
@OmarIthawi please final look to |
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. Thanks @shadinaif!
Looking forward to see this backend being used in staging. It's hardcoded in staging, but should be doable to customize:
aeca194
to
c46d56b
Compare
Change description
Move Backends to this repo
Type of change
Related issues
https://appsembler.atlassian.net/browse/RED-2707
Checklists
Development
Security
Code review