Skip to content

Problem with new ApiProperty security  #1795

Description

@VincentDugard

API Platform version(s) affected: 2.6.1

Description

I have this property in my User entity

image

The entity User have a manager that can access this property.
This code works for GET request, however for PUT or PATCH request I get this error
Unable to get a property on a non-object.

I don't see why this wouldn't work so I think it's a bug

edit : I did more research and it looks like "object" value is "App\Entity\User" and not the User object

How to reproduce
Access a property of "object" in @ApiProperty security feature (see code above).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions