@baris Thanks I will try this solution. Always helpful.
middleware.admin.isAdmin is not needed
In your plugins you don't have to call
middleware.admin.isAdminthis is already handled in core at https://github.com/NodeBB/NodeBB/blob/master/src/routes/index.js#L122-L123
Same with middleware.applyCSRF this is called on admin routes as well.
user.isAdministrator also exists. Do they perform the same function?
isAdmin()is the middleware, whereas
isAdministratoris the library method. They are functionally similar, except the middleware handles redirecting the user to