mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-12 10:27:06 +00:00
move policies routes
This commit is contained in:
@@ -28,11 +28,11 @@ export default async function EditPolicyPage(props: EditPolicyPageProps) {
|
|||||||
);
|
);
|
||||||
policyResponse = res.data.data;
|
policyResponse = res.data.data;
|
||||||
} catch {
|
} catch {
|
||||||
redirect(`/${params.orgId}/settings/policies/resource`);
|
redirect(`/${params.orgId}/settings/policies/resources/public`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!policyResponse) {
|
if (!policyResponse) {
|
||||||
redirect(`/${params.orgId}/settings/policies/resource`);
|
redirect(`/${params.orgId}/settings/policies/resources/public`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -46,7 +46,9 @@ export default async function EditPolicyPage(props: EditPolicyPageProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Button asChild variant="outline">
|
<Button asChild variant="outline">
|
||||||
<Link href={`/${params.orgId}/settings/policies/resource`}>
|
<Link
|
||||||
|
href={`/${params.orgId}/settings/policies/resources/public`}
|
||||||
|
>
|
||||||
{t("resourcePoliciesSeeAll")}
|
{t("resourcePoliciesSeeAll")}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -23,7 +23,9 @@ export default async function CreateResourcePolicyPage(
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Button asChild variant="outline">
|
<Button asChild variant="outline">
|
||||||
<Link href={`/${params.orgId}/settings/policies/resource`}>
|
<Link
|
||||||
|
href={`/${params.orgId}/settings/policies/resources/public`}
|
||||||
|
>
|
||||||
{t("resourcePoliciesSeeAll")}
|
{t("resourcePoliciesSeeAll")}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -330,7 +330,7 @@ export default function ResourceAuthenticationPage() {
|
|||||||
asChild
|
asChild
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
href={`/${org.org.orgId}/settings/policies/resource/${policies.sharedPolicy.niceId}`}
|
href={`/${org.org.orgId}/settings/policies/resources/public/${policies.sharedPolicy.niceId}`}
|
||||||
>
|
>
|
||||||
{t("editSharedPolicy")}
|
{t("editSharedPolicy")}
|
||||||
<ArrowRightIcon className="size-4" />
|
<ArrowRightIcon className="size-4" />
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export const orgNavSections = (
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
title: "sidebarResourcePolicies",
|
title: "sidebarResourcePolicies",
|
||||||
href: "/{orgId}/settings/policies/resource",
|
href: "/{orgId}/settings/policies/resources/public",
|
||||||
icon: (
|
icon: (
|
||||||
<GlobeIcon className="size-4 flex-none" />
|
<GlobeIcon className="size-4 flex-none" />
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export function ResourcePoliciesTable({
|
|||||||
<DropdownMenuContent align="end">
|
<DropdownMenuContent align="end">
|
||||||
<Link
|
<Link
|
||||||
className="block w-full"
|
className="block w-full"
|
||||||
href={`/${policyRow.orgId}/settings/policies/resource/${policyRow.niceId}`}
|
href={`/${policyRow.orgId}/settings/policies/resources/public/${policyRow.niceId}`}
|
||||||
>
|
>
|
||||||
<DropdownMenuItem>
|
<DropdownMenuItem>
|
||||||
{t("viewSettings")}
|
{t("viewSettings")}
|
||||||
@@ -219,7 +219,7 @@ export function ResourcePoliciesTable({
|
|||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
<Link
|
<Link
|
||||||
href={`/${policyRow.orgId}/settings/policies/resource/${policyRow.niceId}`}
|
href={`/${policyRow.orgId}/settings/policies/resources/public/${policyRow.niceId}`}
|
||||||
>
|
>
|
||||||
<Button variant={"outline"}>
|
<Button variant={"outline"}>
|
||||||
{t("edit")}
|
{t("edit")}
|
||||||
@@ -288,7 +288,7 @@ export function ResourcePoliciesTable({
|
|||||||
onAdd={() =>
|
onAdd={() =>
|
||||||
startNavigation(() =>
|
startNavigation(() =>
|
||||||
router.push(
|
router.push(
|
||||||
`/${orgId}/settings/policies/resource/create`
|
`/${orgId}/settings/policies/resources/public/create`
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export function CreatePolicyForm({}: CreatePolicyFormProps) {
|
|||||||
if (res && res.status === 201) {
|
if (res && res.status === 201) {
|
||||||
const niceId = res.data.data.niceId;
|
const niceId = res.data.data.niceId;
|
||||||
router.push(
|
router.push(
|
||||||
`/${org.org.orgId}/settings/policies/resource/${niceId}`
|
`/${org.org.orgId}/settings/policies/resources/public/${niceId}`
|
||||||
);
|
);
|
||||||
toast({
|
toast({
|
||||||
title: t("success"),
|
title: t("success"),
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export function EditPolicyNameSectionForm({
|
|||||||
|
|
||||||
if (payload.niceId && payload.niceId !== policy.niceId) {
|
if (payload.niceId && payload.niceId !== policy.niceId) {
|
||||||
router.replace(
|
router.replace(
|
||||||
`/${org.org.orgId}/settings/policies/resource/${payload.niceId}`
|
`/${org.org.orgId}/settings/policies/resources/public/${payload.niceId}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user