diff --git a/app/kubernetes/react/components/namespaces.ts b/app/kubernetes/react/components/namespaces.ts index 3a3c445c1..32edfc0b5 100644 --- a/app/kubernetes/react/components/namespaces.ts +++ b/app/kubernetes/react/components/namespaces.ts @@ -2,9 +2,11 @@ import angular from 'angular'; import { r2a } from '@/react-tools/react2angular'; import { withUIRouter } from '@/react-tools/withUIRouter'; +import { withCurrentUser } from '@/react-tools/withCurrentUser'; +import { withReactQuery } from '@/react-tools/withReactQuery'; import { NamespacesDatatable } from '@/react/kubernetes/namespaces/ListView/NamespacesDatatable'; import { NamespaceAppsDatatable } from '@/react/kubernetes/namespaces/ItemView/NamespaceAppsDatatable'; -import { withCurrentUser } from '@/react-tools/withCurrentUser'; +import { NamespaceAccessDatatable } from '@/react/kubernetes/namespaces/AccessView/AccessDatatable'; export const namespacesModule = angular .module('portainer.kubernetes.react.components.namespaces', []) @@ -23,4 +25,11 @@ export const namespacesModule = angular 'isLoading', 'onRefresh', ]) + ) + .component( + 'namespaceAccessDatatable', + r2a(withUIRouter(withReactQuery(NamespaceAccessDatatable)), [ + 'dataset', + 'onRemove', + ]) ).name; diff --git a/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html b/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html index 693cbf7c3..abc1815bf 100644 --- a/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html +++ b/app/kubernetes/views/resource-pools/access/resourcePoolAccess.html @@ -112,18 +112,5 @@ -
inherited
are inherited from the group access. They cannot be removed or modified at the environment level but they can be overridden.
- override
are overriding the group access for the related users/teams.
-
-
-
-
-
-
- |
-
- |
- ||
---|---|---|---|
-
-
-
-
- {{ item.Name }}
- inherited
- override
- |
- {{ item.Type }} | -||
Loading... | -|||
No authorized users or teams. | -
inherited
are inherited from the
+ group access. They cannot be removed or modified at the
+ environment level but they can be overridden.
+ override
are overriding the group
+ inherited
+
+ )}
+ {item.Override && (
+
+ override
+
+ )}
+ >
+ );
+ },
+});
diff --git a/app/react/portainer/access-control/AccessManagement/AccessDatatable/columns/name.ts b/app/react/portainer/access-control/AccessManagement/AccessDatatable/columns/name.ts
new file mode 100644
index 000000000..9054a023d
--- /dev/null
+++ b/app/react/portainer/access-control/AccessManagement/AccessDatatable/columns/name.ts
@@ -0,0 +1,3 @@
+import { helper } from './helper';
+
+export const name = helper.accessor('Name', {});
diff --git a/app/react/portainer/access-control/AccessManagement/AccessDatatable/columns/role.tsx b/app/react/portainer/access-control/AccessManagement/AccessDatatable/columns/role.tsx
new file mode 100644
index 000000000..4dd8b38bf
--- /dev/null
+++ b/app/react/portainer/access-control/AccessManagement/AccessDatatable/columns/role.tsx
@@ -0,0 +1,89 @@
+import { CellContext } from '@tanstack/react-table';
+import { Edit, X } from 'lucide-react';
+
+import { useRbacRoles } from '@/react/portainer/users/RolesView/useRbacRoles';
+
+import { Button } from '@@/buttons';
+import { Select } from '@@/form-components/Input';
+
+import { Access, getTableMeta } from '../types';
+
+import { helper } from './helper';
+
+export const role = helper.accessor('Role.Name', {
+ cell: RoleCell,
+ meta: {
+ width: 320,
+ },
+});
+
+function RoleCell({
+ row: { original: item, getCanSelect },
+ table,
+ getValue,
+}: CellContext