NHAS / wag

Simple Wireguard 2FA
BSD 3-Clause "New" or "Revised" License
499 stars 27 forks source link

Adding to a group while creating new registration token stopped working #54

Closed Pi-jar closed 4 months ago

Pi-jar commented 1 year ago

When I create a new user via the web interface in "Users/+New registration tokens" and fill in the "Groups" field with a value in the form "group:" (the group already exists and has some members) the new user is being created together with a token. The group is shown correctly in the "Users" table by the name of the user, but when I click "Groups" menu in the POLICY section of the left menu the newly created user is not added into the group chosen and I have to add the user manually there. I use 7.3.0 version of the WAG.

NHAS commented 1 year ago

Hi there, just going to try and replicate this on my side.

Just for my own notes, before 7.3.0 the user showed up under groups when you used the registration token that had a group attached?

And can you supply wag logs for this?

NHAS commented 1 year ago

From what I can see in the code (and remembering it) this is really used for a users initial groups so when they do the registration for the first time for things like OIDC they'll have the server or whatnot in their wireguard configuration file.

This wasnt intended as a permanent addition to a users groups. But I can understand how this is very confusing so I'll make it clearer and probably make it so that registration tokens can set groups.

NHAS commented 7 months ago

This is vaguely on unstable now. However its not completely, and unstable is undergoing a huge rewrite. So use with caution