How to show a particular asset to only logged in users ? | Community
Skip to main content
Ankan_Ghosh
Level 3
February 3, 2023
Solved

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

  • February 3, 2023
  • 4 replies
  • 1343 views

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. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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.

 

4 replies

Umesh_Thakur
Community Advisor
Community Advisor
February 3, 2023

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

Ankan_Ghosh
Level 3
February 3, 2023

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 . 

Himanshu_Jain
Community Advisor
Community Advisor
February 3, 2023

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.html?lang=en

 

 

 

 

 

Himanshu Jain
krishna_sai
Community Advisor
Community Advisor
February 3, 2023

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.


Hope this helps
Thanks,
Krishna

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
February 3, 2023

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
Ankan_Ghosh
Level 3
February 3, 2023

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