Add Group Ids to the Taxonomy Terms

Created on 19 June 2023, over 1 year ago
Updated 13 October 2023, about 1 year ago

Problem/Motivation

Hi, We have created groups with in the CMS and we want to add taxonomy terms to those groups, so that only users in those groups or Admins can access them. Similar to Group module ( https://www.drupal.org/project/group → ) but for taxonomy terms. Do you know if the Group Term Module would be helpful to implement such functionality?. If not, Are there any plans for adding this functionality?. Thanks

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @rahulrao.cs
  • 🇧🇪Belgium lobsterr

    Yes, you can use this module, to handle taxonomy terms based on group permissions

  • LOBsTerr, thank you for the fast reply.

    I was able to figure out how to add content and taxonomy to groups and I was able to add users to those groups. However, when referencing taxonomy in content types, we see all the taxonomy terms but we want to restrict the user to select taxonomy terms that in that group.

    I added the screenshot for an idea of the issue. Did you understand my issue?. Did you run into this issue? If you are free and willing, we can have a short WebEx conference where I can share my screen and we can talk this over?

    Thanks!

  • Hi LOBsTerr, Sorry not to bother. Just adding to the previous comment. I created a new vocabulary and added 2 terms in first group and 2 terms in second group and added the taxonomy reference in a content type. When I logged in as an user in group 1 and tried to create a new node, I saw all 4 terms in that node but not just the 2 terms that are that group. Attached the screenshots

  • 🇧🇪Belgium lobsterr

    Let me check this case, maybe we need a custom access handler for such case.

  • Thank you for checking into this case. Here is what I have tried since I last posted. I tried with adding a custom view where we pass the group id as a contextual filter to check if I can restrict the taxonomies based on the group type but It wasn't very helpful. Thanks again. We appreciate your continued help

  • 🇧🇪Belgium lobsterr

    For my tests, I used Standard profile and Article content type, with Tags reference field.
    1) I have added Tags vocabulary my group type
    2) I have create three taxonomy terms
    3) I added two terms to the group
    4) When I for example using a user with any permissions in group I don't see these terms.
    5) And when I add user as member with view permissions, I can see taxonomy terms

    I believe there is a problem with configuration and permissions, because it exactly works as you need.

    I would suggest first to take out all permissions for specific roles member or outsider and check that you cannot access these terms and then gradually add necessary permissions.

    I hope it would help

  • Hi Lobster,

    Thanks a lot for checking.

    You mentioned that you did a taxonomy entity reference (my group type) in Article content type and added 2 taxonomy terms to group 1. When Logged in as an user from group 1 and trying to add new node, Were you just seeing 2 terms that in that group in the entity reference field in Article or all the 3 terms?.

    I tried replicating the same and when I tried to add a new node and in the entity reference field, I was still able to see 3 taxonomy terms in that field even though the user doesn't have access to view all the terms. P.F.A, Screenshot of the permissions.

    Thanks

  • 🇧🇪Belgium lobsterr

    I have only a few ideas.
    1) You use the wrong user with the wrong role when you check it
    2) Your taxonomy terms are not part of the group (Do you see them here /group/[gid]/terms) ?

  • Thanks for checking on it. I tried again today with stripping all the user permissions and creating a new user but I still see all the taxonomy terms (Not just the terms in the group). If you are free and willing, we can have a short WebEx conference where I can share my screen and we can talk this over?. It would be of great help.

    Thanks!

  • 🇧🇪Belgium lobsterr

    find me in the slack, we will see what we can do

  • Hi Lobster, Thanks for the reply. Not sure if this the one you are referring but I don't have to access to it. https://drupal.slack.com/. Can I ask if there is any other slack org that I can find you in?. Thanks

  • 🇧🇪Belgium lobsterr

    yes, there

  • Status changed to Closed: outdated about 1 year ago
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024