Using the FileExplorer, I want to control the permitted behaviour for each item (file or directory).
Basically I am implementing a directory browser with download capability BUT I need to restrict what can be downloaded bsed on a combination of file attributes and which user is logged in.
Using a custom provider, I can add attributes (and additional columns) to the grid - one of these indicates visually to the user whether they can perform a download (i.e. all the logic has been applied to determine whether they can download the item).
I have further implemented a test in the "Handler" so that if the user does try to "open" the item they are ignored. However I would like to go further and catch the attempt on the client side (maybe pop-up a window saying not allowed).
- However I note that on the client, I can't seem to get to the additional attributes which have been defined (presumably I could go through some convoluted steps to get the grid and then get the column from it), surely a clientside "Get_Attribute(name)" method would make sense?
- I also note that I cna't set the permissions of the file item on the server side (e.g. whilst processing the file items in the custom provider I tried setting the permissions and discover that they are readonly). Woudl it not be sensible to be able to control permission on each file tiem individually?