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

Fix duplicate inserts in the 2fa provider registry DAO #10462

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

ChristophWurst
Copy link
Member

This fixes the condition of setting the enabled/disabled state of a specific user-provider tuple more than once. I forgot to handle this in #9632.

cc DB pros @nickvergessen @rullzer. Is this the correct way to do an UPSERT with our query builder? Does the isolation level of our supported DBs guarantee that this is conflict free now?

Discovered while making the TOTP app ready for Nextcloud 14 nextcloud/twofactor_totp#263.

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Lets do it!

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 31, 2018
@MorrisJobke MorrisJobke mentioned this pull request Jul 31, 2018
51 tasks
@rullzer rullzer merged commit eedfb0d into master Jul 31, 2018
@rullzer rullzer deleted the fix/provider-registry-duplicate-entries branch July 31, 2018 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: authentication high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants