mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 03:43: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') {
 | 
					    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);
 | 
					      const entity = await contentManagerService.fetchAll(model, query);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // allow user with create permission to know a single type is not created
 | 
					      // allow user with create permission to know a single type is not created
 | 
				
			||||||
@ -95,7 +95,7 @@ module.exports = {
 | 
				
			|||||||
        return ctx.notFound();
 | 
					        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();
 | 
					        return ctx.forbidden();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user