Enforce assignment permissions and show active milestones

Gate assignment creation and editing by the relevant permissions, show ongoing milestones on the timeline, and restrict the forbidden-page admin link to authorized users. Also use the shared RBAC role type and tighten sidebar active-state matching.
This commit is contained in:
Ichsan Kurniawan
2026-11-10 11:27:05 +07:00
parent 279b642a7a
commit e67f671983
9 changed files with 147 additions and 56 deletions
+1 -5
View File
@@ -41,11 +41,7 @@ const SidebarItem: FC<Props> = ({ menu, expand, onChangeExpand }) => {
}
const getActiveBackgroundMenu = () => {
const currentPath = pathanme || '';
const fullPath = '/admin' + (menu.path || '');
const isActive = menu.path === '' ? currentPath === '/admin' || currentPath === '/admin/' : currentPath === fullPath || (menu.path && currentPath.startsWith(fullPath + '/'));
if (isActive) {
if (pathanme === '/admin' + menu.path) {
return {
color: theme === 'dark' ? '#fff' : theme === 'system' && systemTheme === 'dark' ? '#fff' : '#fff',
fontWeight: theme === 'light' ? 600 : theme === 'system' && systemTheme === 'light' ? 600 : undefined,