Merge branch 'master' into patch-1

This commit is contained in:
Jim LAURIE 2018-10-26 16:38:09 +02:00 committed by GitHub
commit 5845eedd0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 4 deletions

View File

@ -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)) {

View File

@ -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"]
}

View File

@ -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) => {

View File

@ -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');