Merge branch 'user-permissions' of https://github.com/strapi/strapi into user-permissions

This commit is contained in:
Jim Laurie 2017-12-07 14:57:45 +01:00
commit cbc0cf73dd
7 changed files with 17 additions and 17 deletions

View File

@ -17,7 +17,10 @@ class Logout extends React.Component { // eslint-disable-line react/prefer-state
handleGoTo = () => {
const id = get(auth.getUserInfo(), 'id') || get(auth.getUserInfo(), '_id');
this.context.router.history.push(`/plugins/content-manager/user/${id}?redirectUrl=/plugins/content-manager/user/?page=0&limit=0&sort=id&source=users-permissions`);
this.context.router.history.push({
pathname: `/plugins/content-manager/user/${id}`,
search: '?redirectUrl=/plugins/content-manager/user/?page=0&limit=0&sort=id&source=users-permissions',
});
}
handleLogout = () => {

View File

@ -49,8 +49,7 @@
"Content-Type",
"Authorization",
"X-Frame-Options",
"Origin",
"X-Forwarded-Host"
"Origin"
]
},
"ip": {

View File

@ -50,8 +50,7 @@
"headers": [
"Content-Type",
"Authorization",
"X-Frame-Options",
"X-Forwarded-Host"
"X-Frame-Options"
]
},
"ip": {

View File

@ -48,8 +48,7 @@
"headers": [
"Content-Type",
"Authorization",
"X-Frame-Options",
"X-Forwarded-Host"
"X-Frame-Options"
]
},
"ip": {

View File

@ -22,9 +22,9 @@ const pluginId = pluginPkg.name.replace(
* @param messages
*/
const formatMessages = messages => reduce(messages, (result, value, key) => {
const obj = result;
obj[`${pluginId}.${key}`] = value;
return obj;
result[`${pluginId}.${key}`] = value;
return result;
}, {});
/**
@ -37,7 +37,7 @@ const requireTranslations = language => {
return require(`translations/${language}.json`); // eslint-disable-line global-require
} catch (error) {
console.error(`Unable to load "${language}" translation for the plugin ${pluginId}. Please make sure "${language}.json" file exists in "pluginPath/admin/src/translations" folder.`);
return false;
return;
}
};
@ -46,10 +46,9 @@ const requireTranslations = language => {
*/
const translationMessages = reduce(strapi.languages, (result, language) => {
const obj = result;
const messages = requireTranslations(language);
obj[language] = formatMessages(messages);
return obj;
result[language] = formatMessages(requireTranslations(language));
return result;
}, {});
export { translationMessages };

View File

@ -82,8 +82,9 @@ function serverRestartWatcher(response) {
// Set headers
options.headers = Object.assign({
'Content-Type': 'application/json',
}, options.headers, {
'X-Forwarded-Host': 'strapi',
}, options.headers);
});
const token = auth.getToken();

View File

@ -281,7 +281,7 @@ module.exports = {
const connector = models[model].orm;
if (!connector) {
throw new Error(`Impossible to determine the use ORM for the model ${model}.`);
throw new Error(`Impossible to determine the ORM used for the model ${model}.`);
}
const convertor = strapi.hook[connector].load().getQueryParams;