Merge branch 'master' into patch-1

This commit is contained in:
Kristian Frølund 2018-03-01 13:38:57 +01:00
commit dc30ed4d90
3 changed files with 4 additions and 5 deletions

View File

@ -20,7 +20,6 @@
font-size: 14px;
font-weight: 500;
text-align: right;
text-transform: capitalize;
cursor: pointer;
&:hover {
color: #333740;

View File

@ -1,5 +1,5 @@
{
"EmptyLi.message": "There are no uploaded files",
"EmptyLi.message": "Yüklenmiş dosya bulunmamaktadır.",
"EntriesNumber.number": "{number} dosya bulundu",
"EntriesNumber.number.plural": "{number} dosya bulundu",
@ -20,7 +20,7 @@
"PluginInputFile.text": "Dosyanızı bu alana sürükleyip bırakın ya da dosya yüklemek için {link}",
"PluginInputFile.link": "gözat",
"notification.delete.success": "The file has been deleted",
"notification.delete.success": "Dosya silindi",
"notification.dropFile.success": "Dosyanız yüklendi",
"notification.dropFiles.success": "{number} dosyalar yüklendi"
}

View File

@ -4,10 +4,10 @@ module.exports = async (ctx, next) => {
if (ctx.request && ctx.request.header && ctx.request.header.authorization) {
try {
const { _id, id } = await strapi.plugins['users-permissions'].services.jwt.getToken(ctx);
if ((id || _id) === undefined) throw new Error('Invalid token: Token did not contain required fields');
ctx.state.user = await strapi.query('user', 'users-permissions').findOne({ _id, id }, ['role']);
ctx.state.user = await strapi.query('user', 'users-permissions').findOne({ _id, id });
} catch (err) {
return ctx.unauthorized(err);
}