Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

SpeckleCache.db allows duplicate account entries #130

Open
1 task done
tsvilans opened this issue Aug 4, 2019 · 1 comment
Open
1 task done

SpeckleCache.db allows duplicate account entries #130

tsvilans opened this issue Aug 4, 2019 · 1 comment
Labels

Comments

@tsvilans
Copy link

tsvilans commented Aug 4, 2019

Step 0:

Expected Behaviour

Logging in with the same email and server as an existing user account should not be possible.

Actual Behaviour

It is possible.

Affected Projects

Any project that creates / uses SpeckleCache.db. PySpeckle creates a SpeckleCache.db file if none is found and enforces uniqueness.

Proposed Solution (if any)

When creating Account table in SpeckleCache.db, set RestApi and Email to be unique by doing UNIQUE(RestApi,Email).

I.e. '''CREATE TABLE Account ([AccountId] integer NOT NULL PRIMARY KEY AUTOINCREMENT,[ServerName] varchar, [RestApi] varchar, [Email] varchar, [Token] varchar, [IsDefault] integer, UNIQUE(RestApi,Email))'''

@didimitrie didimitrie added the bug label Aug 13, 2019
@didimitrie
Copy link
Member

relates to #123 too :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants