middleware.admin.isAdmin is not needed
-
In your plugins you don't have to call
middleware.admin.isAdmin
this is already handled in core at https://github.com/NodeBB/NodeBB/blob/master/src/routes/index.js#L122-L123Same with middleware.applyCSRF this is called on admin routes as well.
-
user.isAdministrator also exists. Do they perform the same function?
Copyright © 2024 NodeBB | Contributors