diff --git a/docs/.vuepress/theme/SearchBox.vue b/docs/.vuepress/theme/SearchBox.vue index bf73b44569..8d078a39c8 100644 --- a/docs/.vuepress/theme/SearchBox.vue +++ b/docs/.vuepress/theme/SearchBox.vue @@ -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)) { diff --git a/packages/strapi-admin/admin/src/config/languages.json b/packages/strapi-admin/admin/src/config/languages.json index 504304b73c..054f9a872e 100644 --- a/packages/strapi-admin/admin/src/config/languages.json +++ b/packages/strapi-admin/admin/src/config/languages.json @@ -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"] } diff --git a/packages/strapi-plugin-users-permissions/config/schema.graphql b/packages/strapi-plugin-users-permissions/config/schema.graphql index 8fa826fb30..c6209fd599 100644 --- a/packages/strapi-plugin-users-permissions/config/schema.graphql +++ b/packages/strapi-plugin-users-permissions/config/schema.graphql @@ -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) => { diff --git a/packages/strapi/bin/strapi-install.js b/packages/strapi/bin/strapi-install.js index 06e799de04..f115ddcd9e 100644 --- a/packages/strapi/bin/strapi-install.js +++ b/packages/strapi/bin/strapi-install.js @@ -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');