strapi/packages/strapi-admin/config/policies/isAuthenticatedAdmin.js

10 lines
152 B
JavaScript
Raw Normal View History

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