Search code examples
permissionsdrupal-7content-typeroles

How to set permissions for a content type on the basis of some specific roles?


Greetings.

I am working on a Drupal 7 site and wanted to discuss few permission related things where I am facing issues.

I want the below mentioned permissions:

1) I want to create a user lets say "Job posting manager" for example. Who can only create , edit job content type. No option to publish.

2) I want to create a another user lets say "Job admin manager" for example. Who can publish / edit the job along with create job.

So how can I set this type of permission for only specific content type and specific users?

Thanks in advance.


Solution

  • Let's say the Content Type is named "job".

    You'd need to create two Roles:

    • Job Posting Manager
    • Job Admin Manager

    You can create these two roles by visiting admin/people/permissions/roles (bottom of the page)

    Once the two roles are created, you should create two different users and assign them the proper role:

    • User1 -> Assign the role "Job Posting Manager"
    • User2 -> Assign the role "Job Admin Manager"

    As a last step, you need to assign the proper permission to the newly created roles:

    • Visit: admin/people/permissions

    • Filter for "node" section and assign the permissions as you desire.

    For a more detail workflow solution, take a look at Workbench and its submodules like Workbench Moderation.