Skip to content

Support Request: Custom Access #1059

@jigarius

Description

@jigarius

The problem

  • Say, I have custom rest resource (node) type "foobar"
  • If Foobar.field_allow_api_access is FALSE, then nobody should be able to access it through the API
    • The node remains accessible through the Drupal interface, but not through the API
  • I'm thinking about implementing a Foobar::access() method to do this check, but there isn't a clear way for me to get the entity which is in context

How would you recommend achieving this? Any help will be appreciated. Thanks.

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