Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to show a particular asset to only logged in users ?

Avatar

Level 3

I have some assets in a particular folder in dam. Now all the assets in this folder should be read by only logged in users. It is an e-commerce site and if a seller logs in only then he /she can access and download these assets. How do I implement that ?

Currently if we somehow get the access of the link to that asset and paste it in a browser, anyone can access it and download it too. I want to stop this thing from happening. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You have to use CUG to restrict the assets and Permission sensitive caching to avoid download from dispatcher cached. (You no need to cache at CDN)

We have already implemented same for pages and assets.

 

Let me know if you need help.

 



Arun Patidar

View solution in original post

6 Replies

Avatar

Community Advisor

You just need to check the present session for the user, as you mentioned that there is a way to login in your application, then definitely there will be a session or token for the logged-in user. just check the session in the component and based on the session availability, show or hide the link or asset frame.

Hope this help.

Umesh Thakur

Avatar

Level 3

This thing is already implemented . If the user logs in then only the download/read is possible . But if the we copy the link of that asset from our dam and paste in a browser window where we are not logged in , it is still accessible . The client wants to stop this from happening . 

Avatar

Community Advisor

You can try for CUG implementation for that folder. Keep it restricted to a specific group and add users accordingly in that group.

Ref: https://experienceleague.adobe.com/docs/experience-manager-learn/assets/advanced/closed-user-groups....

 

 

 

 

 

Himanshu Jain

Avatar

Community Advisor

Hi @Ankan_Ghosh 
you can try applying closed user groups to the folder which you want to authenticate and also provide login URL so that when we try hitting asset directly it might redirect you to login page.

krishna_sai_0-1675410952466.png
Hope this helps
Thanks,
Krishna

 

Avatar

Correct answer by
Community Advisor

You have to use CUG to restrict the assets and Permission sensitive caching to avoid download from dispatcher cached. (You no need to cache at CDN)

We have already implemented same for pages and assets.

 

Let me know if you need help.

 



Arun Patidar

Avatar

Level 3

Thanks for the help. I will try to implement it. And if I face some issues, I will reach out to you.