Skip to content

feat: Option to disallow usergroup and role combinations#186

Merged
Jako merged 2 commits intomasterfrom
usergroup_disallow
Apr 16, 2026
Merged

feat: Option to disallow usergroup and role combinations#186
Jako merged 2 commits intomasterfrom
usergroup_disallow

Conversation

@matdave
Copy link
Copy Markdown

@matdave matdave commented Apr 13, 2026

This adds a new usergroupsFieldDisallow verifier option to limit which groups a user can register for when using the usergroupsField option.

@jaygilmore
Copy link
Copy Markdown
Member

Seems like it would be good to get this into a release, soon. @Jako are you able to take a peek at it for approval?

@Jako
Copy link
Copy Markdown
Collaborator

Jako commented Apr 15, 2026

This is a very useful addition for security reasons. I would also add a ‘usergroupsFieldAllow’ option.

@jaygilmore
Copy link
Copy Markdown
Member

This is a very useful addition for security reasons. I would also add a ‘usergroupsFieldAllow’ option.

How should these two settings interact do you think, @Jako?

@Jako
Copy link
Copy Markdown
Collaborator

Jako commented Apr 15, 2026

For security reasons, a whitelist option is the better choice. However, a blacklist option is also useful, as it ensures that the ‘Administrator’ group can be excluded by default. I would check the blacklist option first and then the whitelist option.

@matdave
Copy link
Copy Markdown
Author

matdave commented Apr 15, 2026

@Jako I've added this change.

Jako added a commit that referenced this pull request Apr 16, 2026
- Add an option to disallow/allow specific usergroups and usergroup role combinations during register, when the user group(s) can be specified with a form field [#186]
- Disallow the `Administrator` group during register, when the user group(s) can be specified with a form field [#186]
- Fix warning 'Creation of dynamic property modx is deprecated'
- Update lexicon
@Jako Jako merged commit f93e2cb into master Apr 16, 2026
@Jako Jako deleted the usergroup_disallow branch April 16, 2026 09:07
Jako added a commit to Jako/Login that referenced this pull request Apr 16, 2026
- Add an option to disallow/allow specific usergroups and usergroup role combinations during register, when the user group(s) can be specified with a form field [modxcms#186]
- Disallow the `Administrator` group during register, when the user group(s) can be specified with a form field [modxcms#186]
- Fix warning 'Creation of dynamic property modx is deprecated'
@Jako Jako mentioned this pull request Apr 16, 2026
@Jako
Copy link
Copy Markdown
Collaborator

Jako commented Apr 16, 2026

I have added this commit, some lexicon changes, a warning fix and the transport package in #187

@jaygilmore
Copy link
Copy Markdown
Member

@Jako @matdave are we waiting on anything to do a build/release of this?

@Jako
Copy link
Copy Markdown
Collaborator

Jako commented Apr 17, 2026

#187 just needs an approve by somebody.

@jaygilmore
Copy link
Copy Markdown
Member

Bah. Sorry. I missed that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants