meta infinite members fix

This commit is contained in:
Čarodej
2022-04-05 07:06:18 +02:00
parent 4e9e8c47c0
commit 2c86c62d7f
2 changed files with 10 additions and 0 deletions

View File

@@ -10,6 +10,11 @@ const ValidatorHelpers = {
// Get max team members limitations
let limit = store.getters.user.data.meta.limitations.max_team_members
// Unlimited option
if (limit.total === -1) {
return false
}
// Get emails from invitations and currently active members
let newInvitationEmails = invitations.map((item) => item['email'])
let allowedMemberEmails = limit.meta.allowed_emails

View File

@@ -10,6 +10,11 @@ class CheckMaxTeamMembersLimitAction
// Get user limitation summary
$limits = $user->limitations->summary();
// Check unlimited option
if ((int) $limits['max_team_members']['total'] === -1) {
return true;
}
// Get currently used member emails
$allowedEmails = $limits['max_team_members']['meta']['allowed_emails'];