logs only for admin

This commit is contained in:
bgamard 2022-02-02 21:17:58 +01:00
parent 3637b832e5
commit 81a7f154c2

View File

@ -508,7 +508,7 @@ public class AppResource extends BaseResource {
* @apiSuccess {String} logs.message Message * @apiSuccess {String} logs.message Message
* @apiError (client) ForbiddenError Access denied * @apiError (client) ForbiddenError Access denied
* @apiError (server) ServerError MEMORY appender not configured * @apiError (server) ServerError MEMORY appender not configured
* @apiPermission user * @apiPermission admin
* @apiVersion 1.5.0 * @apiVersion 1.5.0
* *
* @param minLevel Filter on logging level * @param minLevel Filter on logging level
@ -529,6 +529,7 @@ public class AppResource extends BaseResource {
if (!authenticate()) { if (!authenticate()) {
throw new ForbiddenClientException(); throw new ForbiddenClientException();
} }
checkBaseFunction(BaseFunction.ADMIN);
// Get the memory appender // Get the memory appender
org.apache.log4j.Logger logger = org.apache.log4j.Logger.getRootLogger(); org.apache.log4j.Logger logger = org.apache.log4j.Logger.getRootLogger();