Highlighted

Can we display tags group based on the user groups? How do we achieve that within namespace?

Avatar

Avatar

nileshdchavan

Avatar

nileshdchavan

nileshdchavan

01-10-2018

I have created a tagging namespace for my website. On my website i have 4 different user groups based on 4 products.

Groups - A, B, C, D

Products - W, X, Y, Z

Group A belongs to product W, Group B for product X and So on.

I have a tagging namespace - 'MyTaggingNamespace' under which i have 4 separate tags for each branch named - 'TagsProductW', 'TagsProductX', 'TagsProductY' and 'TagsProductZ'

My requirement is to edit the assets metadata where i'll also have option to select the tags for the asset based on the user logged  in (user can be from any group - A to D). So for User from Group B should have access only to the tags for product X i.e. TagsProductX. Similarly, user from Group D should have access only for tags under TagsProductZ

I have component for edit asset details where i have given the namespace details - MyTaggingNamespace. And for each group i have configured permission to access corresponding tags only, not all product tags as mentioned above. The corresponding available tags would be available based on the group of the logged in user.

Now, with this set-up, when i edit the assets and click on tags to select the tags to be associated with the asset, it shows me all the 4 tags - 'TagsProductW', 'TagsProductX', 'TagsProductY' and 'TagsProductZ', despite of the fact that i have given permissions set only based on the user group.

So my question is, is there a way we can limit the tags available for editing based on the user group? If yes, how it can be achieved? If not, what would be the alternate way? I want to avoid the route of creating separate namespaces for each group. Please guide. Thank you.

-Nilesh

Replies

Highlighted

Avatar

Avatar

manish_cf

Avatar

manish_cf

manish_cf

04-10-2018

You need to edit the filter criteria of query which populates display of cq:tags OOTB widget, you need to customize tags widget component.

Thanks,

Manish

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

04-10-2018

Hi,

You can restrict user based on group via permission.

Go to Useradmin console and remove all permission for tag and give read permission to the group whose you want tags available. and make sure user doesn't have read permission for tag namespace.

Note : User may have permission to tags from other group or individual permission might have set.

http://localhost:4502/useradmin

Specific to your case - user still have read permission to tags, that's why it is being displayed.

The only way to restrict tags via permission which can be set either manual or using code.