Logo
Explore Help
Register Sign In
yujunjun/strapi
1
0
Fork 0
You've already forked strapi
mirror of https://github.com/strapi/strapi.git synced 2025-08-01 21:36:25 +00:00
Code Issues Packages Projects Releases Wiki Activity
strapi/packages/core/admin/server/policies/isAuthenticatedAdmin.js

14 lines
231 B
JavaScript
Raw Normal View History

Add check many permissions route/controller / Add userAbility to the context's state / Add isAuthenticatedAdmin.js Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-06-10 18:04:47 +02:00
'use strict';
refactor policy API
2021-09-24 09:35:25 +02:00
// module.exports = (ctx, next) => {
// if (!ctx.state.isAuthenticated) {
// return ctx.unauthorized();
// }
Add check many permissions route/controller / Add userAbility to the context's state / Add isAuthenticatedAdmin.js Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-06-10 18:04:47 +02:00
refactor policy API
2021-09-24 09:35:25 +02:00
// return next();
// };
module.exports = ({ ctx }) => {
return ctx.state.isAuthenticated;
Add check many permissions route/controller / Add userAbility to the context's state / Add isAuthenticatedAdmin.js Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-06-10 18:04:47 +02:00
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 494ms Template: 21ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API