diff --git a/frontend/web/components/tags/AddEditTags.tsx b/frontend/web/components/tags/AddEditTags.tsx index a0169eb9404a..0363268e061c 100644 --- a/frontend/web/components/tags/AddEditTags.tsx +++ b/frontend/web/components/tags/AddEditTags.tsx @@ -40,10 +40,14 @@ const AddEditTags: FC = ({ const [tab, setTab] = useState<'SELECT' | 'CREATE' | 'EDIT'>('SELECT') const [deleteTag] = useDeleteTagMutation() const [createTag] = useCreateTagMutation() - const { permission: projectAdminPermission } = useHasPermission({ + const permissionType = Utils.getFlagsmithHasFeature('manage_tags_permission') + ? 'MANAGE_TAGS' + : 'ADMIN' + + const { permission: createEditTagPermission } = useHasPermission({ id: projectId, level: 'project', - permission: 'ADMIN', + permission: permissionType, }) useEffect(() => { @@ -166,12 +170,14 @@ const AddEditTags: FC = ({ !readOnly && (
{Utils.renderWithPermission( - projectAdminPermission, - Constants.projectPermissions('Admin'), + createEditTagPermission, + Constants.projectPermissions( + permissionType === 'ADMIN' ? 'Admin' : 'Manage Tags', + ),
- + {({ permission }) => Utils.renderWithPermission( permission, - Constants.projectPermissions('Admin'), + Constants.projectPermissions( + permissionType === 'ADMIN' ? 'Admin' : 'Manage Tags', + ),