Apply RBAC permissions across admin and tasks

Enforce page access and action-level permissions across admin and task views, including exports and record actions. Move user creation to a client component behind server-side permission checks, standardize data fetching, and remove the deprecated user-role route.
This commit is contained in:
Ichsan Kurniawan
2026-11-09 17:32:31 +07:00
parent 1b37ff65f5
commit 279b642a7a
69 changed files with 1070 additions and 1167 deletions
@@ -115,7 +115,7 @@ const ComponentAreaPage: FC<Props> = ({ data, actions }) => {
{
title: 'Action',
key: 'action',
render: (_, record) => actions.includes('UPDATE') || actions.includes('DELETE') && (
render: (_, record) => (actions.includes('UPDATE') || actions.includes('DELETE')) && (
<AlertDialog>
<DropdownMenu>
<DropdownMenuTrigger asChild>
@@ -166,7 +166,7 @@ const ComponentAreaPage: FC<Props> = ({ data, actions }) => {
<div className="flex flex-1 items-center space-x-2">
<Input placeholder="Search company..." className="h-8 w-full sm:w-62.5 lg:w-72" onChange={handleSearch} />
</div>
{actions.includes('CREATE') &&
{actions?.includes('CREATE') &&
<Button variant='ghost' size="sm" className="ml-auto h-8 w-full sm:w-max text-his" onClick={() => setShowFormDialog(true)}>
<PlusCircledIcon className="mr-2 h-4 w-4" />
Create New Area