Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple groups in pb-login #170

Merged

Conversation

daliboris
Copy link
Contributor

Current implementation allows only one group to be specified in pb-login component.

This change allows multple groups in pb-login, for example tei and quest.

Groups are separated items by space and/or punctuation.

This change doesn't break existing implementations.

@daliboris daliboris changed the title Feature/pb login multiple groups Allow multiple groups in pb-login Nov 23, 2023
src/pb-login.js Outdated
_checkGroup(info) {
if (this.group) {
return info.groups && info.groups.indexOf(this.group) > -1;
let groupArray = this.group.split(/\W+/);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using any punctuation would not allow valid group names like tei-demo or similar. Maybe limit it to whitespace or comma?

@daliboris
Copy link
Contributor Author

Yes, thank you.

I prefer a space and a comma because the value of the group property is displayed in the dialog when the login is not successful.

The warning message looks like a natural sentence if the groups are separated by a comma followed by a space.

@wolfgangmm wolfgangmm merged commit 907542e into eeditiones:master Dec 31, 2023
1 check passed
Copy link

🎉 This PR is included in version 2.15.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants