Skip to content

[Security] Outdated docs for security voters #21093

Open
@crtl

Description

@crtl

API for voters was changed but this change is not reflected in the documentation of:
How to Use Voters to Check User Permissions > The Voter Interface
https://symfony.com/doc/8.0/security/voters.html#the-voter-interface.

The code samples still show and reference the old voter api but supports and voteOnAttribute were removed.

The docs also dont mention that you can inject controller arguments into your voter by referencing the argument name in the IsGranted::subject argument but from the examples you can deduce that it is.
https://symfony.com/doc/8.0/security/voters.html#setup-checking-for-access-in-a-controller

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions