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

Remove Organization and Team models from Lastuser #232

Open
jace opened this issue Mar 17, 2018 · 3 comments
Open

Remove Organization and Team models from Lastuser #232

jace opened this issue Mar 17, 2018 · 3 comments

Comments

@jace
Copy link
Member

jace commented Mar 17, 2018

Unlike #91, which proposes merging Organization and Team with User to form a new Principal model, this one proposes eliminating the two models entirely.

In the course of discussing #91, we’ve arrived at two distinct facets of a Principal: ownership and agency. Only User and Client (in specific circumstances) possess agency and are therefore classified as “actors”.

Ownership is a hard problem for Lastuser to address, especially delegated ownership via the Organization and Team hierarchies. Lastuser’s model doesn’t work at all for Hasjob, and in Funnel, it regularly causes breakage when attempting to synchronise. Funnel having to replicate Lastuser’s hierarchy and also provide it own models like UserGroup (a scoped version of Team) is indication that there can’t be a single way to define hierarchies.

Lastuser should lose the Organization and Team models and let a client app define them. Every other app can access them as client-provided resources, now that those APIs are worked out. The client app could be Funnel or whatever replaces it.

Transitions:

  1. Clients can be owned by organizations. This will now change to a primary owner and any number of secondary owners.
  2. The organizations and teams resources will become namespaced and other clients will need updating. Lastuser can temporarily support resource aliases.
  3. Usernames are a shared namespace between User and Organization. This will now need to become a Username model, where the username can be claimed by a User (limit 1) or a trusted Client (any number).
@jace
Copy link
Member Author

jace commented Sep 28, 2018

Counter-proposal: remove only Team for now. Organizations are widely used, so attempting to remove them will require a transition period lasting months. Teams, in contrast, are only used in Kharcha and Funnel, so their removal will be simpler.

If organizations are removed, usernames must be removed from Lastuser as well. Attempting to do username management between Lastuser and a client app is asking for trouble.

#118 already discusses a pathway for replacing teams with roles. There is a concern there about userids for teams and Flask-Lastuser. Temporary workaround: every organization has two uuid columns to represent owners and members, and the API passes these on in place of teams; all other teams will be deleted.

@jace
Copy link
Member Author

jace commented Sep 28, 2018

The ideal path is that both Organizations and usernames move into Funnel, and that Flask-Lastuser is updated to transparently query Funnel instead of Lastuser. This minimizes disruption to other apps. However, we need a transition pathway to give Funnel breathing room to find an appropriate implementation, so it seems prudent to start with paring down functionality in Lastuser.

@jace
Copy link
Member Author

jace commented Jun 3, 2019

Organizations and teams can be marked as deprecated in Lastuser once Funnel rolls out membership models into the master branch via hasgeek/funnel#401.

jace added a commit that referenced this issue Mar 23, 2020
The Members team was introduced in #28, but has never gained traction, so is being deleted to aid transition to the direct membership model presented in #151, #118 and #232. The final switch to direct org membership will happen elsewhere, in hasgeek/funnel#401.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant