xuang7 opened a new issue, #6976:
URL: https://github.com/apache/texera/issues/6976

   ### Feature Summary
   
   Contributors are currently plain-text metadata. When a contributor's email 
matches a registered user, the two are not connected, and when the person 
registers later, their past attributions are not associated with their account.
   
   This feature links contributors to user accounts by email. If a 
contributor's email does not match any existing user, a placeholder account is 
created automatically. When that person later registers with the same email, 
they
   claim the placeholder account, and their past dataset attributions are 
associated with it.
   
   ### Proposed Solution or Design
   
   Storage
   - `dataset_contributor` gains a nullable `uid` FK (ON DELETE SET NULL)
   - `user` gains `is_placeholder BOOLEAN NOT NULL DEFAULT FALSE`; 
`ck_nulltest` is relaxed to allow credential-less placeholder rows
   
   Linking (file-service): on saving contributors, an email is resolved against 
the user table (normalized: lower/trim). 
   - Match: bind `uid`
   - no match: create a placeholder user (INACTIVE, `is_placeholder = true`, 
comment notes the origin dataset) and bind it.
   
   Claiming (auth)
   - Password registration: if the email matches a row with `is_placeholder = 
true`, set the password on that row and clear the flag instead of rejecting 
with "exists". Only credential-less placeholder rows are claimable; real 
accounts (including INACTIVE ones awaiting approval) are never claimable.
   - Google login: the existing claim-by-email branch additionally clears 
`is_placeholder`. Google login already proves mailbox ownership.
   
   Trust model: a claimed account stays INACTIVE, so login is still gated by 
the existing admin approval. 
   
   Placeholders are only created by users with dataset write access, and each 
has a traceable sponsor (the dataset owner), so admins can verify claims 
out-of-band.
   
   ### Affected Area
   
   Storage / Metadata


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to