thewca / worldcubeassociation.org

All of the code that runs on worldcubeassociation.org
https://www.worldcubeassociation.org/
GNU General Public License v3.0
327 stars 175 forks source link

Distinguish human users from non-human users #8011

Open timreyn opened 1 year ago

timreyn commented 1 year ago

Is your feature request related to a problem? Please describe. As I understand it, there is currently no distinction between human users and non-human users, like "CubingUSA Treasurer". This means that they show up in the WCIF API as "persons", and there's no way to indicate that they are not persons. They also have dummy fields like gender and date of birth.

Describe the solution you'd like This probably requires both a field in the database, and a UI for setting it. There are probably some things that we should prevent non-humans from doing, like registering for competitions.

Even better would be something similar to how facebook pages work -- a page can be linked to one or more people, they log in to their own account, and then switch between acting as themselves and acting as the role account. This way, people don't need to log out, and there isn't a shared password that needs to be changed when someone stops being a member of a particular organization. But this is a more complicated model, and more work.

JonEsparaz commented 1 year ago

Even better would be something similar to how facebook pages work -- a page can be linked to one or more people, they log in to their own account, and then switch between acting as themselves and acting as the role account. This way, people don't need to log out, and there isn't a shared password that needs to be changed when someone stops being a member of a particular organization. But this is a more complicated model, and more work.

Could this be done using hidden teams? I would much prefer this solution so Speedcubing Canada's officers can access all Speedcubing Canada competitions.

timreyn commented 1 year ago

That's a good idea! Maybe there should be a separate optional "organization" field for each competition, and the options for that are teams.

coder13 commented 1 year ago

It should be trivial to put a type field on users. You can have type: user | entity | board and like you said, have a separate lists for "entities" as organizers.

EdHollingdale commented 1 year ago

I'd be a supporter of having 'entities' like the ROs and Sub-ROs that exist (since I believe these are the only non-human users we have currently).

However, if we were going to use 'teams' that would probably require a revamp of the teams editing interface etc as currently it is a bit messy and wouldn't scale to having a 'team' for each RO and US/Spanish Sub-RO for example.

dunkOnIT commented 1 year ago

I agree that this requires a deeper rework of how we treat organizations/entities - Users can have rights take actions through Entities, but Entities are not themselves Users.

This is not a priority at the moment, but we have a Users Service implementation on our backlog, and I believe Entities implementation could be incorporated into that project.