mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
Merge branch 'preview' of github.com:makeplane/plane-ee into uat
This commit is contained in:
28
apiserver/plane/db/migrations/0075_alter_fileasset_asset.py
Normal file
28
apiserver/plane/db/migrations/0075_alter_fileasset_asset.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 4.2.11 on 2024-08-29 09:40
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import plane.db.models.asset
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("db", "0074_deploy_board_and_project_issues"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="fileasset",
|
||||
name="asset",
|
||||
field=models.FileField(
|
||||
upload_to=plane.db.models.asset.get_upload_path,
|
||||
validators=[
|
||||
django.core.validators.FileExtensionValidator(
|
||||
allowed_extensions=["jpg", "jpeg", "png"]
|
||||
),
|
||||
plane.db.models.asset.file_size,
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -12,7 +12,7 @@ import { useUser, useWorkspace } from "@/hooks/store";
|
||||
// plane web components
|
||||
import { SubscriptionActivation } from "@/plane-web/components/workspace";
|
||||
// plane web hooks
|
||||
import { useSelfHostedSubscription } from "@/plane-web/hooks/store";
|
||||
import { useSelfHostedSubscription, useWorkspaceSubscription } from "@/plane-web/hooks/store";
|
||||
|
||||
const ActivationPage = observer(() => {
|
||||
// router
|
||||
@@ -22,14 +22,16 @@ const ActivationPage = observer(() => {
|
||||
membership: { currentWorkspaceRole },
|
||||
} = useUser();
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { currentWorkspaceSubscribedPlanDetail: currentWorkspaceSubscribedPlan } = useWorkspaceSubscription();
|
||||
const { licenseActivationByWorkspaceSlug } = useSelfHostedSubscription();
|
||||
// derived values
|
||||
const pageTitle = currentWorkspace?.name ? `${currentWorkspace.name} - Activation` : undefined;
|
||||
const isAdmin = currentWorkspaceRole === EUserWorkspaceRoles.ADMIN;
|
||||
const isSelfManaged = !!currentWorkspaceSubscribedPlan?.is_self_managed;
|
||||
|
||||
if (!workspaceSlug || !currentWorkspace?.id) return <></>;
|
||||
if (!workspaceSlug || !currentWorkspace?.id || !isSelfManaged) return <></>;
|
||||
|
||||
if (!isAdmin || licenseActivationByWorkspaceSlug())
|
||||
if (!isAdmin && licenseActivationByWorkspaceSlug())
|
||||
return (
|
||||
<>
|
||||
<PageHead title={pageTitle} />
|
||||
|
||||
@@ -55,7 +55,7 @@ export const WORKSPACE_SETTINGS = {
|
||||
export const WORKSPACE_SETTINGS_LINKS = [
|
||||
WORKSPACE_SETTINGS["general"],
|
||||
WORKSPACE_SETTINGS["members"],
|
||||
WORKSPACE_SETTINGS["activation"],
|
||||
// WORKSPACE_SETTINGS["activation"], // FIXME: Temporary hide this tab
|
||||
WORKSPACE_SETTINGS["project_states"],
|
||||
WORKSPACE_SETTINGS["billing-and-plans"],
|
||||
WORKSPACE_SETTINGS["integrations"],
|
||||
|
||||
Reference in New Issue
Block a user