mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Fix access to public role permissions (#11904)
This commit is contained in:
@@ -69,7 +69,7 @@ import { unexpectedError } from '@/utils/unexpected-error';
|
||||
import { translate } from '@/utils/translate-object-values';
|
||||
|
||||
type Role = {
|
||||
id: number;
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
icon: string;
|
||||
@@ -176,12 +176,14 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function navigateToRole({ item }: { item: Role }) {
|
||||
router.push({
|
||||
name: 'settings-roles-item',
|
||||
params: lastAdminRoleId.value
|
||||
? { primaryKey: item.id, lastAdminRoleId: lastAdminRoleId.value }
|
||||
: { primaryKey: item.id },
|
||||
});
|
||||
if (item.id !== 'public' && lastAdminRoleId.value) {
|
||||
router.push({
|
||||
name: 'settings-roles-item',
|
||||
params: { primaryKey: item.id, lastAdminRoleId: lastAdminRoleId.value },
|
||||
});
|
||||
} else {
|
||||
router.push(`/settings/roles/${item.id}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user