diff --git a/src/core/adminfunctions.js b/src/core/adminfunctions.js index 106c350..c5f011c 100644 --- a/src/core/adminfunctions.js +++ b/src/core/adminfunctions.js @@ -292,6 +292,7 @@ export async function executeRollback( brcoor, canvasid, logger = null, + isAdmin = false, ) { if (!canvasid) { return [403, 'canvasid not defined']; @@ -320,8 +321,8 @@ export async function executeRollback( const width = u - x + 1; const height = v - y + 1; - if (width * height > 1000000) { - return [403, 'Can not rollback more than 1m pixels at onec']; + if (!isAdmin && width * height > 1000000) { + return [403, 'Can not rollback more than 1m pixels at once']; } const pxlCount = await rollbackCanvasArea( diff --git a/src/routes/api/modtools.js b/src/routes/api/modtools.js index 97db245..f62647a 100644 --- a/src/routes/api/modtools.js +++ b/src/routes/api/modtools.js @@ -144,6 +144,7 @@ router.post('/', upload.single('image'), async (req, res, next) => { brcoor, canvasid, aLogger, + (req.user.userlvl === 1), ); res.status(ret).send(msg); return;