We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to manipulate the Folder in the Treeview

Hi all,

i have to display the Folders and Files of an physical Path. Now I have to check each Folder, if the user, who ist logged in, has the permission to see the this Folder. The Foldernames build like this: Unique Number - Space - Name

I have to check, if the Unique Number is linked in the DB to the logged in User. If he has no permissions the Folder should not be displayed.

How can i do this. Is there a Folderlist on Serverside which i can access with "foreach", do my work and change the visibility of the folders?


Thank you for your help.

Christian


1 Reply

IL Indhumathy Loganathan Syncfusion Team February 14, 2023 02:58 PM UTC

Hi Andreas,


Greetings from Syncfusion support.


We would like to let you know that we have declared your EJ1 products as retired products from our volume 4 SP release. So we suggest you to look into our EJ2 products. In our EJ2 File Manager component, we have access control support similar to meet your requirement where you need to set the permission based on user id. When restricted users try to access the denied folders, it will show the access denied error popup. Check out the below link for details.


https://ej2.syncfusion.com/javascript/documentation/file-manager/access-control/#access-rules


You need to send the user id through beforeSend event. By setting attributes as deny, you can prevent required file operations in the File Manager component. Please find the File service provider from the below link.


https://github.com/SyncfusionExamples/common-filemanager-providers-access-control/


Check out the shared details and confirm whether the shared component is suitable for your requirements.


Regards,

Indhumathy L


Loader.
Up arrow icon