strapi/packages/strapi-admin/config/policies/isAuthenticatedAdmin.js
2020-07-08 11:05:50 +02:00

10 lines
152 B
JavaScript

'use strict';
module.exports = (ctx, next) => {
if (!ctx.state.isAuthenticatedAdmin) {
throw strapi.errors.forbidden();
}
return next();
};