(core) Adding new column in users table "ref" with unique identifier.

Summary:
There is a new column in users table called ref (user reference).
It holds user's unique reference number that can be used for features
that require some kind of ownership logic (like comments).

Test Plan: Updated tests

Reviewers: georgegevoian, paulfitz

Reviewed By: georgegevoian, paulfitz

Differential Revision: https://phab.getgrist.com/D3641
This commit is contained in:
Jarosław Sadziński
2022-10-03 16:45:44 +02:00
parent 356090abae
commit 9628253fd8
16 changed files with 189 additions and 33 deletions

View File

@@ -13,6 +13,7 @@ the following fields:
- Access: string or None
- UserID: integer or None
- UserRef: string or None
- Email: string or None
- Name: string or None
- Origin: string or None
@@ -43,7 +44,7 @@ class User(object):
"""
def __init__(self, data, tables, is_sample=False):
for attr in ('Access', 'UserID', 'Email', 'Name', 'Origin', 'SessionID',
'IsLoggedIn'):
'IsLoggedIn', 'UserRef'):
setattr(self, attr, data[attr])
self.LinkKey = LinkKey(data['LinkKey'])