mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 23:29:33 +00:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
dc30ed4d90
@ -20,7 +20,6 @@
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
text-transform: capitalize;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #333740;
|
||||
|
||||
@ -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"
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user