mirror of
https://github.com/strapi/strapi.git
synced 2025-11-17 10:38:30 +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++) {
|
for (let i = 0; i < pages.length; i++) {
|
||||||
if (res.length >= max) break
|
if (res.length >= max) break
|
||||||
const p = pages[i]
|
const p = pages[i]
|
||||||
// filter out results that do not match current ersion context
|
// filter out results that do not match current version context
|
||||||
if (~p.path.slice(1).indexOf(searchContext)) continue
|
if ( ! p.path.startsWith(searchContext, 1)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// filter out results that do not match current locale
|
// filter out results that do not match current locale
|
||||||
if (this.getPageLocalePath(p) !== localePath) continue
|
if (this.getPageLocalePath(p) !== localePath) continue
|
||||||
if (matches(p)) {
|
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: {
|
type: {
|
||||||
UsersPermissionsPermission: false // Make this type NOT queriable.
|
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: {
|
resolver: {
|
||||||
Query: {
|
Query: {
|
||||||
|
me: {
|
||||||
|
resolverOf: 'User.me',
|
||||||
|
resolver: {
|
||||||
|
plugin: 'users-permissions',
|
||||||
|
handler: 'User.me'
|
||||||
|
}
|
||||||
|
},
|
||||||
role: {
|
role: {
|
||||||
resolverOf: 'UsersPermissions.getRole',
|
resolverOf: 'UsersPermissions.getRole',
|
||||||
resolver: async (obj, options, ctx) => {
|
resolver: async (obj, options, ctx) => {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ module.exports = function (plugin, cliArguments) {
|
|||||||
|
|
||||||
if (!isStrapiInstalledWithNPM) {
|
if (!isStrapiInstalledWithNPM) {
|
||||||
// Create the directory yarn doesn't do it it
|
// 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
|
// Add a package.json so it installs the dependencies
|
||||||
shell.touch(`${pluginPath}/package.json`);
|
shell.touch(`${pluginPath}/package.json`);
|
||||||
fs.writeFileSync(`${pluginPath}/package.json`, JSON.stringify({}), 'utf8');
|
fs.writeFileSync(`${pluginPath}/package.json`, JSON.stringify({}), 'utf8');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user