2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-29 05:56:47 +00:00

Check that the user has the required permisions

This commit is contained in:
Oliver 2021-08-10 16:53:20 +10:00
parent ed94d4eb96
commit fcc5bf8c30

View File

@ -273,6 +273,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
getCategoryDescriptionCard(extra: false),
];
if (InvenTreeAPI().checkPermission('part', 'add')) {
tiles.add(
ListTile(
title: Text(L10().categoryCreate),
@ -294,6 +295,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
)
);
}
}
return tiles;
}