mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
5845eedd0a
@ -63,8 +63,10 @@ export default {
|
||||
for (let i = 0; i < pages.length; i++) {
|
||||
if (res.length >= max) break
|
||||
const p = pages[i]
|
||||
// filter out results that do not match current ersion context
|
||||
if (~p.path.slice(1).indexOf(searchContext)) continue
|
||||
// filter out results that do not match current version context
|
||||
if ( ! p.path.startsWith(searchContext, 1)) {
|
||||
continue;
|
||||
}
|
||||
// filter out results that do not match current locale
|
||||
if (this.getPageLocalePath(p) !== localePath) continue
|
||||
if (matches(p)) {
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"languages": ["ar", "en", "es", "fr", "de", "it", "ko", "nl", "pl", "pt", "pt-BR", "tr", "zh", "zh-Hans", "ja"]
|
||||
"languages": ["en", "ar", "es", "fr", "de", "it", "ko", "nl", "pl", "pt", "pt-BR", "ru", "tr", "zh", "zh-Hans", "ja"]
|
||||
}
|
||||
|
||||
@ -2,8 +2,35 @@ module.exports = {
|
||||
type: {
|
||||
UsersPermissionsPermission: false // Make this type NOT queriable.
|
||||
},
|
||||
definition: `
|
||||
type UsersPermissionsMe {
|
||||
_id: ID!
|
||||
username: String!
|
||||
email: String!
|
||||
confirmed: Boolean
|
||||
blocked: Boolean
|
||||
role: UsersPermissionsMeRole
|
||||
}
|
||||
|
||||
type UsersPermissionsMeRole {
|
||||
_id: ID!
|
||||
name: String!
|
||||
description: String
|
||||
type: String
|
||||
}
|
||||
`,
|
||||
query: `
|
||||
me: UsersPermissionsMe
|
||||
`,
|
||||
resolver: {
|
||||
Query: {
|
||||
me: {
|
||||
resolverOf: 'User.me',
|
||||
resolver: {
|
||||
plugin: 'users-permissions',
|
||||
handler: 'User.me'
|
||||
}
|
||||
},
|
||||
role: {
|
||||
resolverOf: 'UsersPermissions.getRole',
|
||||
resolver: async (obj, options, ctx) => {
|
||||
|
||||
@ -63,7 +63,7 @@ module.exports = function (plugin, cliArguments) {
|
||||
|
||||
if (!isStrapiInstalledWithNPM) {
|
||||
// Create the directory yarn doesn't do it it
|
||||
shell.exec('mkdir', [pluginPath]);
|
||||
shell.mkdir('-p', [pluginPath]);
|
||||
// Add a package.json so it installs the dependencies
|
||||
shell.touch(`${pluginPath}/package.json`);
|
||||
fs.writeFileSync(`${pluginPath}/package.json`, JSON.stringify({}), 'utf8');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user