mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Remove useless check
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
parent
0e61698ef5
commit
647b5a2b6e
@ -83,7 +83,7 @@ module.exports = {
|
||||
);
|
||||
|
||||
if (kind === 'singleType') {
|
||||
// fetchAll for a singleType only return on entity
|
||||
// fetchAll for a singleType only return one entity
|
||||
const entity = await contentManagerService.fetchAll(model, query);
|
||||
|
||||
// allow user with create permission to know a single type is not created
|
||||
@ -95,7 +95,7 @@ module.exports = {
|
||||
return ctx.notFound();
|
||||
}
|
||||
|
||||
if (entity && pm.ability.cannot(ACTIONS.read, pm.toSubject(entity))) {
|
||||
if (pm.ability.cannot(ACTIONS.read, pm.toSubject(entity))) {
|
||||
return ctx.forbidden();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user