mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 17:10:08 +00:00
Environment agnostic for users-permissions configs
This commit is contained in:
parent
520c0bfcc8
commit
957e7a08cb
@ -29,7 +29,7 @@ module.exports = async cb => {
|
||||
}
|
||||
|
||||
const pluginStore = strapi.store({
|
||||
environment: strapi.config.environment,
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions'
|
||||
});
|
||||
|
@ -16,6 +16,7 @@ module.exports = {
|
||||
const params = ctx.request.body;
|
||||
|
||||
const store = await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions'
|
||||
});
|
||||
@ -128,6 +129,7 @@ module.exports = {
|
||||
|
||||
connect: async (ctx, next) => {
|
||||
const grantConfig = await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'grant'
|
||||
@ -204,6 +206,7 @@ module.exports = {
|
||||
|
||||
register: async (ctx) => {
|
||||
if (!(await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'advanced'
|
||||
|
@ -71,6 +71,7 @@ module.exports = {
|
||||
|
||||
create: async (ctx) => {
|
||||
if ((await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'advanced'
|
||||
@ -101,6 +102,7 @@ module.exports = {
|
||||
update: async (ctx, next) => {
|
||||
try {
|
||||
const advancedConfigs = await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'advanced'
|
||||
|
@ -172,6 +172,7 @@ module.exports = {
|
||||
|
||||
getEmailTemplate: async (ctx) => {
|
||||
ctx.send(await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'email'
|
||||
@ -184,6 +185,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'email'
|
||||
@ -194,6 +196,7 @@ module.exports = {
|
||||
|
||||
getAdvancedSettings: async (ctx) => {
|
||||
ctx.send(await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'advanced'
|
||||
@ -206,6 +209,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'advanced'
|
||||
@ -216,6 +220,7 @@ module.exports = {
|
||||
|
||||
getProviders: async (ctx) => {
|
||||
ctx.send(await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'grant'
|
||||
@ -228,6 +233,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'grant'
|
||||
|
@ -50,6 +50,7 @@ exports.connect = (provider, query) => {
|
||||
});
|
||||
|
||||
const advanced = await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'advanced'
|
||||
@ -97,6 +98,7 @@ const getProfile = async (provider, query, callback) => {
|
||||
const access_token = query.access_token || query.code || query.oauth_token;
|
||||
|
||||
const grant = await strapi.store({
|
||||
environment: '',
|
||||
type: 'plugin',
|
||||
name: 'users-permissions',
|
||||
key: 'grant'
|
||||
|
Loading…
x
Reference in New Issue
Block a user