diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-27 16:55:03 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-27 16:55:03 +0200 |
commit | 954605a804da399317ca62afa2fb9244afa11ebf (patch) | |
tree | de6ee69280bfb928bc01c29430e13d5b820e921a /server/controllers/api/request-schedulers.ts | |
parent | e02573ad67626210ed279bad321ee139094921a1 (diff) | |
download | PeerTube-954605a804da399317ca62afa2fb9244afa11ebf.tar.gz PeerTube-954605a804da399317ca62afa2fb9244afa11ebf.tar.zst PeerTube-954605a804da399317ca62afa2fb9244afa11ebf.zip |
Support roles with rights and add moderator role
Diffstat (limited to 'server/controllers/api/request-schedulers.ts')
-rw-r--r-- | server/controllers/api/request-schedulers.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/request-schedulers.ts b/server/controllers/api/request-schedulers.ts index 28f46f3ee..4c8fbe18b 100644 --- a/server/controllers/api/request-schedulers.ts +++ b/server/controllers/api/request-schedulers.ts | |||
@@ -7,14 +7,14 @@ import { | |||
7 | getRequestVideoQaduScheduler, | 7 | getRequestVideoQaduScheduler, |
8 | getRequestVideoEventScheduler | 8 | getRequestVideoEventScheduler |
9 | } from '../../lib' | 9 | } from '../../lib' |
10 | import { authenticate, ensureIsAdmin, asyncMiddleware } from '../../middlewares' | 10 | import { authenticate, ensureUserHasRight, asyncMiddleware } from '../../middlewares' |
11 | import { RequestSchedulerStatsAttributes } from '../../../shared' | 11 | import { RequestSchedulerStatsAttributes, UserRight } from '../../../shared' |
12 | 12 | ||
13 | const requestSchedulerRouter = express.Router() | 13 | const requestSchedulerRouter = express.Router() |
14 | 14 | ||
15 | requestSchedulerRouter.get('/stats', | 15 | requestSchedulerRouter.get('/stats', |
16 | authenticate, | 16 | authenticate, |
17 | ensureIsAdmin, | 17 | ensureUserHasRight(UserRight.MANAGE_REQUEST_SCHEDULERS), |
18 | asyncMiddleware(getRequestSchedulersStats) | 18 | asyncMiddleware(getRequestSchedulersStats) |
19 | ) | 19 | ) |
20 | 20 | ||