Skip to content

Commit

Permalink
fix: /tags/categories checked for permissions using .includes meaning…
Browse files Browse the repository at this point in the history
… admin wasn't handled for
  • Loading branch information
Jan0660 committed Feb 3, 2024
1 parent bc97a8c commit efeffdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/tags/TagCategoriesPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createSignal, type Component, Show } from "solid-js";
import { useNavigate } from "@solidjs/router";
import { Tag } from "../../client/Client";
import { hasGroup } from "../../client/Client";
import "../../index.css";
import { client, tagCategories, tagsStore, userInfo } from "../..";
import { client, tagCategories, userInfo } from "../..";
import { SimpleTable } from "solid-simple-table";
import "solid-simple-table/dist/SimpleTable.css";

Expand Down Expand Up @@ -73,7 +73,7 @@ const TagCategoriesPage: Component = () => {
getRowID={(row: any) => "tagsTable." + (row as Row).name}
/>
</Show>
<Show when={userInfo.getStore()?.groups.includes("perm:edit_tags")}>
<Show when={hasGroup("perm:edit_tags", userInfo.getStore()?.groups)}>
<h2>New Category</h2>
<label>Name: </label>
<input type="text" class="input" value={newCategoryName()} onChange={e => {
Expand Down

0 comments on commit efeffdc

Please sign in to comment.