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

Disambiguate authorship from ownership #216

Closed
jace opened this issue Aug 7, 2017 · 1 comment
Closed

Disambiguate authorship from ownership #216

jace opened this issue Aug 7, 2017 · 1 comment

Comments

@jace
Copy link
Member

jace commented Aug 7, 2017

Lastuser (and most HasGeek apps) currently use the user_id column to refer to the user who owns the given object.

With the move to principals in #91, we need to disambiguate ownership (any principal can be an owner) from authorship (only a user can be an author as teams and organizations are non-human).

Proposal:

  1. Reduce the scope of the user_id column to only refer to authorship. It continues to point to a User instance.
  2. Where the possibility of ownership by a non-human exists (almost everywhere), add a principal_id column that refers to the Principal.
  3. When adding functionality to convert a User account into an Organization account (ticket pending), the split process (reverse of the current merge_users) should preserve the user_id column while changing the value of the principal_id column.

Alternative proposal: using user_id and principal_id leaves some ambiguity on which is for what. Use the new column names author_id and owner_id instead.

@jace
Copy link
Member Author

jace commented Oct 1, 2018

This is no longer relevant to Lastuser as we are removing functionality here, and Principal will not be implemented. Perhaps the only relevance is for clients, to track which user created a client. However, that too is in question as clients will be mandatorily owned by users when #232 is implemented.

@jace jace closed this as completed Oct 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant