security: expand and complete permissions matrix with granular, enterprise-ready permissions
This commit is contained in:
@@ -27,7 +27,7 @@ export function Sidebar({ theme: _theme }: { theme: string }) {
|
||||
{
|
||||
href: '/notifications',
|
||||
label: 'Notifications',
|
||||
ability: 'role.manage',
|
||||
ability: 'notifications.view',
|
||||
icon: <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}><path strokeLinecap="round" strokeLinejoin="round" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" /></svg>
|
||||
},
|
||||
]
|
||||
@@ -50,7 +50,7 @@ export function Sidebar({ theme: _theme }: { theme: string }) {
|
||||
{
|
||||
href: '/activity-logs',
|
||||
label: 'Activity Logs',
|
||||
ability: 'user.view',
|
||||
ability: 'activity-logs.view',
|
||||
icon: <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}><path d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||
},
|
||||
]
|
||||
@@ -73,20 +73,20 @@ export function Sidebar({ theme: _theme }: { theme: string }) {
|
||||
{
|
||||
href: '/system-settings',
|
||||
label: 'System Settings',
|
||||
ability: null,
|
||||
ability: 'settings.view',
|
||||
icon: <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}><path strokeLinecap="round" strokeLinejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
|
||||
},
|
||||
{
|
||||
href: '/documentation',
|
||||
label: 'Dokumentasi',
|
||||
ability: null,
|
||||
ability: 'documentation.view',
|
||||
icon: <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}><path strokeLinecap="round" strokeLinejoin="round" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>
|
||||
},
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
const canManageSettings = permissions.includes('settings.manage');
|
||||
const canManageSettings = permissions.includes('settings.view');
|
||||
|
||||
return (
|
||||
<aside className="w-[260px] h-screen p-4 shrink-0 relative z-20 flex flex-col anim-left">
|
||||
|
||||
Reference in New Issue
Block a user