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

Improve node_access() #1002

Open
wants to merge 1 commit into
base: 7.x-1.x
Choose a base branch
from

Conversation

jacobembree
Copy link

I'd like to improve the node_access() function. For one thing, I'd like to add the op parameter so that node_access() can be used as an access callback for node/add/%.
@signalpoint do you have any recommendations or suggestions before I start? I'm thinking of using Drupal.user.content_types_user_permissions extensively.
Does node_access() indeed belong in DrupalGap or does it go in jDrupal?

@signalpoint
Copy link
Owner

@jacobembree I think node_access() can stay inside DrupalGap, since I assume folks using just jDrupal are building their own front end and access control layers.

If you'd like to add support for the op parameter, that'd be great. I personally don't use that feature very much on the front end, and have since used just the backend to determine access control, and then on the front end just try to make it so the UX can never land them in a spot where they don't have access to do something.

@jacobembree
Copy link
Author

Almost all of my code came from Drupal's node_access() and node_node_access() functions.

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

Successfully merging this pull request may close these issues.

None yet

2 participants