mirror of https://github.com/Budibase/budibase.git
5 changed files with 79 additions and 91 deletions
@ -0,0 +1,18 @@ |
|||||
|
<script> |
||||
|
import { Page } from "@budibase/bbui" |
||||
|
import { auth } from "stores/portal" |
||||
|
import { redirect } from "@roxi/routify" |
||||
|
|
||||
|
// Only admins allowed here |
||||
|
$: { |
||||
|
if (!$auth.isAdmin) { |
||||
|
$redirect("../") |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
{#if $auth.isAdmin} |
||||
|
<Page> |
||||
|
<slot /> |
||||
|
</Page> |
||||
|
{/if} |
||||
@ -1,14 +0,0 @@ |
|||||
<script> |
|
||||
import { redirect } from "@roxi/routify" |
|
||||
import { Page } from "@budibase/bbui" |
|
||||
import { auth } from "../../../../../stores/portal" |
|
||||
|
|
||||
// only admins allowed here |
|
||||
if (!$auth.isAdmin) { |
|
||||
$redirect("../../../portal") |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<Page> |
|
||||
<slot /> |
|
||||
</Page> |
|
||||
@ -1,14 +0,0 @@ |
|||||
<script> |
|
||||
import { Page } from "@budibase/bbui" |
|
||||
import { auth } from "../../../../../stores/portal" |
|
||||
import { redirect } from "@roxi/routify" |
|
||||
|
|
||||
// only admins allowed here |
|
||||
if (!$auth.isAdmin) { |
|
||||
$redirect("../../../portal") |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<Page> |
|
||||
<slot /> |
|
||||
</Page> |
|
||||
Loading…
Reference in new issue