Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Request: Custom Access #1059

Open
jigarius opened this issue Aug 2, 2019 · 3 comments
Open

Support Request: Custom Access #1059

jigarius opened this issue Aug 2, 2019 · 3 comments

Comments

@jigarius
Copy link

jigarius commented Aug 2, 2019

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.

@OnGitHubSchatz
Copy link

Stumbled upon your issue, I'm curious did you end up implementing access static method?

@jigarius
Copy link
Author

jigarius commented Mar 8, 2021

It's been so long that I don't even remember filling this issue. Sorry. Not much info to add at this point.

@OnGitHubSchatz
Copy link

It's been so long that I don't even remember filling this issue. Sorry. Not much info to add at this point.

No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants