wasabee-project / Wasabee-Server

The Server-Side component for the Wasabee Project tools for Enlightened Agents.
MIT License
11 stars 5 forks source link

Bug: OPs owned by a kicked team member may be accessible by other team members #30

Open le-jeu opened 1 year ago

le-jeu commented 1 year ago

Currently, to add a team permission to an OP, you need to:

Once added, those conditions are not preserved by some operations:

  1. the owner is removed from the team
  2. the OP changed owner (unavailable from any UI :roll_eyes: )
  3. maybe no point 3, I didn't dig too much into the code

That leads to OP with permission to team (and access to team member) while the owner isn't in the team. This occurs if a team member becomes inactive while sharing draws with a team, polluting the op list of fellow agents.

cloudkucooland commented 1 year ago

So, when an agent (Y) is removed from (or leaves) a team (X)

  1. get a list of any ops Y owns: [Z...]
  2. foreach Z... : (z) remove any permissions X has to z

Would that address this fully?

le-jeu commented 1 year ago

Yes. Additionnal idea, a team owner could opt-out their team from an op (that would require some UI addition)

cloudkucooland commented 1 year ago

https://github.com/wasabee-project/Wasabee-Server/commit/28266cb07803533bc0032ddf2e24f8c481f3f38f

le-jeu commented 1 year ago

This doesn't address the case when the OP changes owner yet.

When agent (Y) get the own of op (X), it can be

or