mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-10 08:38:17 -05:00
feat: user edit functionality (managing permissions)
This commit is contained in:
@@ -2,8 +2,11 @@ import React from 'react';
|
||||
import { NextPage } from 'next';
|
||||
import SettingsLayout from '../../components/Settings/SettingsLayout';
|
||||
import SettingsMain from '../../components/Settings/SettingsMain';
|
||||
import useRouteGuard from '../../hooks/useRouteGuard';
|
||||
import { Permission } from '../../hooks/useUser';
|
||||
|
||||
const SettingsPage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return (
|
||||
<SettingsLayout>
|
||||
<SettingsMain />
|
||||
|
||||
@@ -2,8 +2,11 @@ import React from 'react';
|
||||
import type { NextPage } from 'next';
|
||||
import SettingsLayout from '../../components/Settings/SettingsLayout';
|
||||
import SettingsJobs from '../../components/Settings/SettingsJobs';
|
||||
import { Permission } from '../../hooks/useUser';
|
||||
import useRouteGuard from '../../hooks/useRouteGuard';
|
||||
|
||||
const SettingsMainPage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return (
|
||||
<SettingsLayout>
|
||||
<SettingsJobs />
|
||||
|
||||
@@ -2,8 +2,11 @@ import React from 'react';
|
||||
import { NextPage } from 'next';
|
||||
import SettingsLayout from '../../components/Settings/SettingsLayout';
|
||||
import SettingsMain from '../../components/Settings/SettingsMain';
|
||||
import { Permission } from '../../hooks/useUser';
|
||||
import useRouteGuard from '../../hooks/useRouteGuard';
|
||||
|
||||
const SettingsMainPage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return (
|
||||
<SettingsLayout>
|
||||
<SettingsMain />
|
||||
|
||||
@@ -2,8 +2,11 @@ import React from 'react';
|
||||
import type { NextPage } from 'next';
|
||||
import SettingsLayout from '../../components/Settings/SettingsLayout';
|
||||
import SettingsPlex from '../../components/Settings/SettingsPlex';
|
||||
import { Permission } from '../../hooks/useUser';
|
||||
import useRouteGuard from '../../hooks/useRouteGuard';
|
||||
|
||||
const PlexSettingsPage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return (
|
||||
<SettingsLayout>
|
||||
<SettingsPlex />
|
||||
|
||||
@@ -2,8 +2,11 @@ import React from 'react';
|
||||
import type { NextPage } from 'next';
|
||||
import SettingsLayout from '../../components/Settings/SettingsLayout';
|
||||
import SettingsServices from '../../components/Settings/SettingsServices';
|
||||
import { Permission } from '../../hooks/useUser';
|
||||
import useRouteGuard from '../../hooks/useRouteGuard';
|
||||
|
||||
const ServicesSettingsPage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return (
|
||||
<SettingsLayout>
|
||||
<SettingsServices />
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import React from 'react';
|
||||
import { NextPage } from 'next';
|
||||
import UserProfile from '../../components/UserProfile';
|
||||
|
||||
const UserProfilePage: NextPage = () => {
|
||||
return <UserProfile />;
|
||||
};
|
||||
|
||||
export default UserProfilePage;
|
||||
12
src/pages/users/[userId]/edit.tsx
Normal file
12
src/pages/users/[userId]/edit.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
import { NextPage } from 'next';
|
||||
import UserEdit from '../../../components/UserEdit';
|
||||
import useRouteGuard from '../../../hooks/useRouteGuard';
|
||||
import { Permission } from '../../../hooks/useUser';
|
||||
|
||||
const UserProfilePage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return <UserEdit />;
|
||||
};
|
||||
|
||||
export default UserProfilePage;
|
||||
@@ -1,8 +1,11 @@
|
||||
import React from 'react';
|
||||
import type { NextPage } from 'next';
|
||||
import UserList from '../../components/UserList';
|
||||
import useRouteGuard from '../../hooks/useRouteGuard';
|
||||
import { Permission } from '../../hooks/useUser';
|
||||
|
||||
const UsersPage: NextPage = () => {
|
||||
useRouteGuard(Permission.MANAGE_USERS);
|
||||
return <UserList />;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user