Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have developed my organization site on drupal, but I m facing some problem in that.
The edit option is available to the anonymous user after login out from the admin account.
I have checked the Permision setting but it is still showing the same problem.
In node module I have given following permission to anonymous user---
access content
administer content types
administer nodes
But when I m removing these permission then nothng is shown to the anonymous user. Please provide remedy to this problem.
Check the screenshots in the attachment for further details.
Comment | File | Size | Author |
---|---|---|---|
Repository screenshot for Srijan.pdf | 638.83 KB | anilkmishra |
Comments
Comment #1
ebeyrent CreditAttribution: ebeyrent commentedHi there,
The issue that you are reporting has nothing to do with Permissions API. Permissions API is a module that lets you grant and revoke permissions via code, such as in an update script.
I'm really not sure what problem you are seeing - the screenshot that you provided shows the currently logged in user as "admin", not anonymous. Perhaps you can get some assistance on IRC, or somewhere more appropriate to help you with your configuration.
Comment #2
saiprasad kandavalli CreditAttribution: saiprasad kandavalli commentedgive only access content permission to that user role
Comment #3
ebeyrent CreditAttribution: ebeyrent commentedAs I stated, this has nothing to do with Permissions API. The problem is that you are granting the wrong permissions to your anonymous role.
administer content types
administer nodes
You would never want to give these permissions to an anonymous user - anyone would be able to delete all your content and content types.
Instead, you need to look at the other permissions that are provided by the Node module - specifically, "edit own <*>" where <*> corresponds to the name of your content type that you want the user to edit.
For example, if you want the anonymous user to be able to create page content, and edit the pages that he or she has created, you would grant the following permissions:
create page content
edit own page content
However, the problem with this approach is that all anonymous users have a UID of 0, which means that your anonymous users will be able to edit ALL page content. If that's what you're going for, then you might as well grant "edit any page content".
Either way, this still has nothing to do with Permissions API, and follow-ups to this topic should occur in the forums or in IRC.