From ca60dd00ab4af9bd7ef5983b8f5159a7bb57e39a Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Mon, 9 Sep 2024 19:48:27 +0530 Subject: [PATCH] chore: removed user limit validation (#1080) --- .../payment/utils/member_payment_count.py | 29 ++++++++++--------- .../(projects)/settings/layout.tsx | 6 ++-- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/apiserver/plane/payment/utils/member_payment_count.py b/apiserver/plane/payment/utils/member_payment_count.py index bc750fe089..e4b3c1e44e 100644 --- a/apiserver/plane/payment/utils/member_payment_count.py +++ b/apiserver/plane/payment/utils/member_payment_count.py @@ -321,15 +321,15 @@ def handle_cloud_payments( """ Case1: Free Plan and Trial Plan a. Invitation case - requested_role is None and requested_invite_list is a list of invite emails with roles - - Allowed only if the total count of current users and invited users and requested invite users is less than or equal to workspace_license.free_seats + - Allowed only if the total count of current users and invited users and requested invite users is less than or equal to workspace_license.free_seats b. Update case - requested_role is a role and requested_invite_list is None - - Allowed for all roles since the total count of current members and invited members is less than or equal to workspace_license.free_seats + - Allowed for all roles since the total count of current members and invited members is less than or equal to workspace_license.free_seats Case2: Paid Plan a. Online Payment case - all allowed - sync back to payment server for calculation b. Offline Payment case - i. Invitation case - requested_role is None and requested_invite_list is a list of invite emails with roles - - Allowed only if the total count of paid current users and paid invited users and paid requested invite users is less than or equal to workspace_license.purchased_seats - ii.Update case - requested_role is a role and requested_invite_list is None + i. Invitation case - requested_role is None and requested_invite_list is a list of invite emails with roles + - Allowed only if the total count of paid current users and paid invited users and paid requested invite users is less than or equal to workspace_license.purchased_seats + ii. Update case - requested_role is a role and requested_invite_list is None - Allowed for roles > 10 if in the purchased seats limit and for roles <= 10 if in the 5 * purchased seats limit """ @@ -402,9 +402,9 @@ def handle_self_managed_payments( return True for all cases Case2: Subscription Plan a. Invitation case - requested_role is None and requested_invite_list is a list of invite emails with roles - - Allowed only if the total count of paid current users and paid invited users and paid requested invite users is less than or equal to workspace_license.purchased_seats + - Allowed only if the total count of paid current users and paid invited users and paid requested invite users is less than or equal to workspace_license.purchased_seats b. Update case - requested_role is a role and requested_invite_list is None - - Allowed for roles > 10 if in the purchased seats limit and for roles <= 10 if in the 5 * purchased seats limit + - Allowed for roles > 10 if in the purchased seats limit and for roles <= 10 if in the 5 * purchased seats limit """ if workspace_license.plan == WorkspaceLicense.PlanChoice.FREE: @@ -460,13 +460,14 @@ def workspace_member_check( # Get the workspace license if os.environ.get("IS_MULTI_TENANT", "0") == "1": - return handle_cloud_payments( - slug=slug, - requested_invite_list=requested_invite_list, - requested_role=requested_role, - current_role=current_role, - workspace_license=workspace_license, - ) + # return handle_cloud_payments( + # slug=slug, + # requested_invite_list=requested_invite_list, + # requested_role=requested_role, + # current_role=current_role, + # workspace_license=workspace_license, + # ) + return True, 0, 0 else: return handle_self_managed_payments( slug=slug, diff --git a/web/app/[workspaceSlug]/(projects)/settings/layout.tsx b/web/app/[workspaceSlug]/(projects)/settings/layout.tsx index c4c12793e3..827a01ce7b 100644 --- a/web/app/[workspaceSlug]/(projects)/settings/layout.tsx +++ b/web/app/[workspaceSlug]/(projects)/settings/layout.tsx @@ -5,7 +5,7 @@ import { ReactNode } from "react"; import { ContentWrapper } from "@plane/ui"; import { AppHeader } from "@/components/core"; // plane web components -import { LicenseSeatsBanner } from "@/plane-web/components/license"; +// import { LicenseSeatsBanner } from "@/plane-web/components/license"; // local components import { WorkspaceSettingHeader } from "./header"; import { MobileWorkspaceSettingsTabs } from "./mobile-header-tabs"; @@ -23,9 +23,7 @@ export default function WorkspaceSettingLayout(props: IWorkspaceSettingLayout) { } />
{/* free banner */} -
- -
+
{/* */}
{/* workspace settings */}