File manager access control

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

In here it says to use SetRules() in the controller to access control the files or folders. However, there are no examples of codes on how to apply it.


1 Reply

SA SureshRajan Alagarsamy Syncfusion Team July 21, 2023 06:02 AM UTC

Hi Hakjun,


Greetings from Syncfusion support.


You can find the SetRules() method details from the Physical File Service provider. Check out the below links.


https://github.com/SyncfusionExamples/ej2-aspcore-file-provider/blob/master/Controllers/FileManagerAccessController.cs#L32


Also, apply the necessary rules to include access permissions as shown in the below code.


https://github.com/SyncfusionExamples/ej2-aspcore-file-provider/blob/master/Controllers/FileManagerAccessController.cs#L120


We have also attached sample for your further reference.


Sample : https://stackblitz.com/edit/react-uhkqmk-lknjfu?file=index.js


Physical File Provider : Attached as zip folder.


Check out the shared details and get back to us if you need any further assistance.


Regards,
Suresh.


Attachment: PhysicalFileProvider_7a5307c9.zip

Loader.
Up arrow icon