Skip to content

Commit

Permalink
Fix permission for committee leaders for creating group form (#1067)
Browse files Browse the repository at this point in the history
fixed permission
  • Loading branch information
MadsNyl authored Aug 18, 2024
1 parent b7c5cba commit 6566839
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const AppRoutes = () => {
<Route element={<Toddel />} path={URLS.toddel} />
<Route path={URLS.form}>
<Route element={<AuthRoute element={<Form />} />} path={`:id/`} />
<Route element={<AuthRoute apps={[PermissionApp.GROUP]} element={<FormAdmin />} />} path={`admin/:id/`} />
<Route element={<AuthRoute apps={[PermissionApp.GROUPFORM]} element={<FormAdmin />} />} path={`admin/:id/`} />
</Route>
<Route element={<Groups />} path={`${URLS.groups.index}*`}>
<Route element={<GroupsOverview />} index />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Groups/GroupDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const GroupDetails = () => {

return (
<>
<AddFineDialog groupSlug={data.slug} />
{isMemberOfGroup && isFinesActive && <AddFineDialog groupSlug={data.slug} />}

<CardHeader>
<div className='space-y-4 lg:space-y-0 lg:flex lg:items-center lg:justify-between'>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Groups/components/GroupAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const GroupAdmin = ({ group }: UpdateGroupModalProps) => {
<>
<SingleUserSearch form={form} inGroup={group.slug} label='Botsjef' name='fines_admin' user={group.fines_admin} />

<MarkdownEditor form={form} label='Botsystem praktiske detaljer' name='fine_info' />
<MarkdownEditor form={form} label='Botsystem praktiske detaljer' name='fine_info' required />
</>
)}

Expand Down
1 change: 1 addition & 0 deletions src/types/Enums.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export enum PermissionApp {
FORMS = 'form',
TODDEL = 'toddel',
BANNERS = 'banner',
GROUPFORM = 'groupform',
}

export enum Groups {
Expand Down

0 comments on commit 6566839

Please sign in to comment.