diff --git a/.env.example b/.env.example
index f3f5dcfa..ae195826 100644
--- a/.env.example
+++ b/.env.example
@@ -16,6 +16,9 @@ NEXTAUTH_ISSUER="http://localhost:8085/realms/orchestrator"
NEXTAUTH_WELL_KNOWN_OVERRIDE="http://localhost:8085/auth/.well-known/openid-configuration"
NEXTAUTH_URL=http://localhost:3000/api/auth
+OPA_PUBLIC_BUNDLE_URL="https://localhost/api/v1/opa/public-bundle"
+OPA_CLIENT_ID="orchestrator-client"
+
# docker-compose variables
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin
diff --git a/pages/metadata/index.tsx b/pages/metadata/index.tsx
index 6b7f262d..27d4ce34 100644
--- a/pages/metadata/index.tsx
+++ b/pages/metadata/index.tsx
@@ -1,7 +1,21 @@
+import React from 'react';
+
import { useRouter } from 'next/router';
+import {
+ PolicyResource,
+ WfoPageUnauthorized,
+ usePolicy,
+} from '@orchestrator-ui/orchestrator-ui-components';
+
export const IndexPage = () => {
const router = useRouter();
+ const { isAllowed } = usePolicy();
+
+ if (!isAllowed(PolicyResource.NAVIGATION_METADATA)) {
+ return ;
+ }
+
router.push('/metadata/products');
};
diff --git a/pages/subscriptions/index.tsx b/pages/subscriptions/index.tsx
index 5beb40ce..b3fd2db4 100644
--- a/pages/subscriptions/index.tsx
+++ b/pages/subscriptions/index.tsx
@@ -1,7 +1,17 @@
import React from 'react';
-import { WfoSubscriptionsListPage } from '@orchestrator-ui/orchestrator-ui-components';
+import {
+ PolicyResource,
+ WfoPolicyRenderPageFallback,
+ WfoSubscriptionsListPage,
+} from '@orchestrator-ui/orchestrator-ui-components';
export default function SubscriptionsPage() {
- return ;
+ return (
+
+
+
+ );
}
diff --git a/pages/tasks/index.tsx b/pages/tasks/index.tsx
index 27877f5e..34589ed7 100644
--- a/pages/tasks/index.tsx
+++ b/pages/tasks/index.tsx
@@ -1,9 +1,17 @@
import React from 'react';
-import { WfoTasksListPage } from '@orchestrator-ui/orchestrator-ui-components';
+import {
+ PolicyResource,
+ WfoPolicyRenderPageFallback,
+ WfoTasksListPage,
+} from '@orchestrator-ui/orchestrator-ui-components';
export function TasksPage() {
- return ;
+ return (
+
+
+
+ );
}
export default TasksPage;
diff --git a/pages/workflows/index.tsx b/pages/workflows/index.tsx
index 04258f78..d9fc1a22 100644
--- a/pages/workflows/index.tsx
+++ b/pages/workflows/index.tsx
@@ -1,7 +1,17 @@
import React from 'react';
-import { WfoWorkflowsListPage } from '@orchestrator-ui/orchestrator-ui-components';
+import {
+ PolicyResource,
+ WfoPolicyRenderPageFallback,
+ WfoWorkflowsListPage,
+} from '@orchestrator-ui/orchestrator-ui-components';
export default function WorkflowsPage() {
- return ;
+ return (
+
+
+
+ );
}
diff --git a/tsconfig.json b/tsconfig.json
index 4c8dcbc8..41a4218d 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,16 +3,16 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
- "@/*": ["./*"],
+ "@/*": ["./*"]
},
"plugins": [
{
- "name": "next",
- },
+ "name": "next"
+ }
],
"strictNullChecks": true,
- "jsx": "preserve",
+ "jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
- "exclude": ["node_modules"],
+ "exclude": ["node_modules"]
}