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

chore: Validation for purchased pricing_plan_quantity #8809

Merged
merged 2 commits into from Jan 30, 2024

Conversation

sojan-official
Copy link
Member

  • Add validations based on purchased pricing_plan_quantity
  • modify dashboard to support the new error message

@vishnu-narayanan vishnu-narayanan temporarily deployed to chatwoot-pr-8809 January 29, 2024 16:30 Inactive
def ensure_installation_pricing_plan_quantity
return unless ChatwootHub.pricing_plan == 'premium'

errors.add(:base, 'User limit reached. Please purchase more licenses from super admin') if User.count >= ChatwootHub.pricing_plan_quantity
Copy link
Member

Choose a reason for hiding this comment

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

For existing accounts with user.count > pricing_plan_quantity, this would immediately disable adding new agents, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is correct. Only if they are on the premium plan.

Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2024-01-30 at 11 24 16 AM

This is a follow-up to the error we showed here.

Copy link
Member

Choose a reason for hiding this comment

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

:shipit:

@sojan-official sojan-official merged commit 0805f36 into develop Jan 30, 2024
15 checks passed
@sojan-official sojan-official deleted the chore/CW-2961-restrict-agent-addition branch January 30, 2024 07:26
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants