Skip to content

Commit

Permalink
allowing only space and comma as a group separator
Browse files Browse the repository at this point in the history
  • Loading branch information
daliboris committed Dec 2, 2023
1 parent 09d5c10 commit 95457af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pb-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class PbLogin extends pbMixin(LitElement) {
/**
* If set, only users being members of the specified group are
* allowed to log in.
* Multiple groups can be defined separating items by space and/or punctuation.
* Multiple groups can be defined separating items by space and/or comma.
*/
group: {
type: String
Expand Down Expand Up @@ -287,7 +287,7 @@ export class PbLogin extends pbMixin(LitElement) {
*/
_checkGroup(info) {
if (this.group) {
let groupArray = this.group.split(/\W+/);
let groupArray = this.group.split(/[\s+,]+/);
let exists = false;
if(info.groups)
groupArray.forEach(async (oneItem) => {
Expand Down

0 comments on commit 95457af

Please sign in to comment.