Skip to content
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

Model & migration for domain-scoped API keys #28608

Merged
merged 3 commits into from
Oct 8, 2020
Merged

Conversation

kaapstorm
Copy link
Contributor

This PR cherrypicks 2 commits from PR #28493 , to follow up @millerdev's comment here.

It separates out the model change and corresponding migration from the rest of the PR, in order to eliminate the risk of complications if we need to roll back the feature.

RISK ASSESSMENT / QA PLAN

QA has just passed for the original PR.

cc @millerdev

@kaapstorm kaapstorm requested a review from esoergel as a code owner October 7, 2020 18:03
@kaapstorm kaapstorm added the product/invisible Change has no end-user visible impact label Oct 7, 2020
Copy link
Contributor

@millerdev millerdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, although may make sense to drop one hunk (see comment).

@@ -3080,4 +3081,6 @@ def role(self):
return UserRole.get(self.role_id)
except ResourceNotFound:
logging.exception('no role with id %s found in domain %s' % (self.role_id, self.domain))
elif self.domain:
return CouchUser.from_django_user(self.user).get_domain_membership(self.domain).role
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a behavior change. Curious why it was included in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree, I should drop that. I'm probably going to amend this commit instead of adding a new one, so that when we merge the original branch we get a conflict instead of the risk of dropping these two lines by accident. (I'm not sure I explained that very well. And I think we'd get a conflict either way. But I'd hate Git to apply the "drop those lines" commit to the second merge.)

(I also forgot to rename that migration.)

@kaapstorm kaapstorm merged commit f142b2f into master Oct 8, 2020
@kaapstorm kaapstorm deleted the nh/role-ui-mig branch October 8, 2020 07:33
@czue
Copy link
Member

czue commented Oct 8, 2020

thanks for picking this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/invisible Change has no end-user visible impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants