Edit content if (taxonomy) Country = United Kingdom I have created a user, now I want to give him permissions so that, when he is logged in, he can view/see all the contents, but can't edit/publish/unpublish/delete them.

Of all the contents, he can view/edit/publish/unpublish/delete only those contents, that has United Kingdom as taxonomy term, for example something like.

Logged in user can see all the contents, but If any content has Country -> "United Kingdom", then give permission to edit/publish/unpublish that particular content?

I have already tried Taxonomy Access Control, but didn't help me. Either I couldn't see any content, or I could edit all of them.

I want to give permission based on Taxonomy term.

I think I will probably need to do bit of coding.

Help?
I have used the Taxonomy Access module before and it should work for what you need to do here.

I'm making some assumptions here:

1) You have a vocabulary called "Country" and "United Kingdom" is a term in that list.

2) You have a field of type "Term Reference" on your content type(s) and it using the "Country" vocabulary.

3) You have a field of type "Term Reference" on your account settings - /admin/config/people/accounts/fields and it using the "Country" vocabulary.

Now, make sure your permissions are set properly:

1) go to /admin/config/people/taxonomy_access

2) "edit access rules" for the "authenticated user" to get to this page:


3) Under "New" you need to select the term you want to manage access for. Hit the "Add" button.

4) Once added, the term with show under the "Tags" heading in the table. I am using the "Tags" vocabulary here, but yours will say "Country".

5) Now you can modify the permissions for View, Update, Delete, Add Tag and View Tag. There is an explanation of these fields as well as how to manage the permission on the bottom of that page, so I wont include it here.

After you have done this, you can login as an authenticated user and the permissions configured above will control the access to your content.