alkem-io / server

Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
http://alkem.io
European Union Public License 1.2
26 stars 4 forks source link

BUG: When invited external user accept invitation as admin to a subspace, auth policy from type agent is is created without policy credentials #4673

Open Comoque1 opened 2 days ago

Comoque1 commented 2 days ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://acc-alkem.io/release-03-08-23-hub-cont/challenges/release-03-08-23-cha-8670/settings/community

  2. Invite external user as admin to a private subspace from a private space

    image.png
  3. In alkemio db take a note of the number of auth policies with type agent that don't have credential rules SELECT * FROM alkemio.authorization_policy where credentialRules = '' and type = 'agent';

  4. Using the invited user register

  5. After the user registers, accept the invitation

  6. Check the auth policies: SELECT * FROM alkemio.authorization_policy where credentialRules = '' and type = 'agent'; - number is increase by 1

    image.png

Expected behavior Credential rules are set to registered external users invited as admin to private subspace from private space.

techsmyth commented 1 day ago

@Comoque1 can you please check the same flow when inviting to a public space? I cannot see how the logic is specific to a subspace, unless an error is thrown during the actual assignment.

techsmyth commented 1 day ago

@Comoque1 scenario to reproduce is I think simpler: invite an external user, get the user to sign up (without accepting invitation), the user's agent does not have credential rules. So it is something with the registration process...

techsmyth commented 1 day ago

@comoque please test again after 4678 has been merged