-
-
Notifications
You must be signed in to change notification settings - Fork 914
feat(permissions): add DELETE_MEDIA permission to allow users to remove media from *arr services #2135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat(permissions): add DELETE_MEDIA permission to allow users to remove media from *arr services #2135
Changes from all commits
0ba4ed7
154f78c
c922f8e
ab63067
a8d61ed
901bac3
6bd6c1e
deb6b7b
451535f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,6 @@ | |
| "files.associations": { | ||
| "globals.css": "tailwindcss" | ||
| }, | ||
| "i18n-ally.localesPaths": [ | ||
| "src/i18n/locale" | ||
| ], | ||
| "i18n-ally.localesPaths": ["src/i18n/locale"], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary change |
||
| "yaml.format.singleQuote": true | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,24 @@ router.get( | |
| } | ||
| } | ||
| ); | ||
|
|
||
| router.get( | ||
| '/settings/radarr', | ||
| isAuthenticated([Permission.ADMIN, Permission.DELETE_MEDIA], { type: 'or' }), | ||
| (_req, res) => { | ||
| const settings = getSettings(); | ||
| return res.status(200).json(settings.radarr); | ||
| } | ||
| ); | ||
|
|
||
| router.get( | ||
| '/settings/sonarr', | ||
| isAuthenticated([Permission.ADMIN, Permission.DELETE_MEDIA], { type: 'or' }), | ||
| (_req, res) => { | ||
| const settings = getSettings(); | ||
| return res.status(200).json(settings.sonarr); | ||
| } | ||
| ); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this moved here? |
||
| router.use('/settings', isAuthenticated(Permission.ADMIN), settingsRoutes); | ||
| router.use('/search', isAuthenticated(), searchRoutes); | ||
| router.use('/discover', isAuthenticated(), discoverRoutes); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,6 @@ import { Router } from 'express'; | |
|
|
||
| const radarrRoutes = Router(); | ||
|
|
||
| radarrRoutes.get('/', (_req, res) => { | ||
| const settings = getSettings(); | ||
|
|
||
| res.status(200).json(settings.radarr); | ||
| }); | ||
|
|
||
|
Comment on lines
-9
to
-14
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this removed? |
||
| radarrRoutes.post('/', async (req, res) => { | ||
| const settings = getSettings(); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,6 @@ import { Router } from 'express'; | |
|
|
||
| const sonarrRoutes = Router(); | ||
|
|
||
| sonarrRoutes.get('/', (_req, res) => { | ||
| const settings = getSettings(); | ||
|
|
||
| res.status(200).json(settings.sonarr); | ||
| }); | ||
|
|
||
|
Comment on lines
-9
to
-14
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this removed? |
||
| sonarrRoutes.post('/', async (req, res) => { | ||
| const settings = getSettings(); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.