-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
display error if token with same application name exists #27587
Conversation
…traint for uid and name so same device names result in unique constraint violation exceptions
…nse (409 for conflict)
OC.Notification.showTemporary(t('core', 'Error while creating device token')); | ||
$.when(creatingToken).fail(function(xhr) { | ||
if (xhr.status === 409) { | ||
OC.Notification.showTemporary(t('core', 'A token for that application already exists. Please choose another application name.')); |
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.
@DeepDiver1975 can you get me the translations for that string?
Not sure if i will get translations by putting them into transifex myself (not under the owncloud organisation).
…from id because autoincrement already prevents empty ones
The added index is a problem because |
Hm, that would also be a bad solution since it could run into unique constraint violations with old tokens... |
@phisch close ? I see one of the files is new migrations that you have added for the tokens table. However I think you already added migrations for that when working on the 9.0->10.0 upgrade. I suggest closing for now as this is not a critical issue and I don't think it's worth spending too much time on a low severity issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Since #27415 seems to be inactive, i created migrations for the authtoken table creation and unique constraint, catched the exception and rendered an appropriate error message.
Related Issue
#24778
#27415 (PR)
Motivation and Context
See related issues & pull requests.
How Has This Been Tested?
Types of changes
Checklist: