Telerik
Home / Community / Forums / RadControls for ASP.NET: Editor / Custom Provider allows create directory

Not answered Custom Provider allows create directory

Feed from this thread
  • Happy avatar

    Posted on Oct 24, 2008 (permalink)

    If a user is never allowed to create any directory how can I programmatically get the "New Folder" to be disabled? The icon is enabled for my sub directories. I'm always returing false from CanCreateDirectory but it's not getting called till AFTER the user has tried to create a directory.

    Reply

  • Telerik Admin admin's avatar

    Posted on Oct 27, 2008 (permalink)

    Hi,

    The "New Folder" tool will be enabled if you have set the Upload permissions for the current folder (DirectoryItem) when you create it in your custom content provider. If you have only read permissions, the "New Folder" will be disabled.

    Best wishes,
    Lini
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • Happy avatar

    Posted on Oct 28, 2008 (permalink)

    That is not happening in my case. When I first create the editor, I'm setting the view path to ONE virtual dir, which is basically a recordType/ID. I'm not setting the delete or upload paths. The goal is that I don't want the user to be able to do ANYTHING at the root level. What I will display at the root level are two folders, one for all the global stuff and one for a local record specific workspace. If the user drills into the global, that is also only READ everywhere. No uploading or deleting. If they drill into the local workspace, they can upload and delete files.

    NOWHERE do I want them to be able to create directories.

    The custom provider is getting called and I'm returning the correct permissions settings for each DirectoryItem but it's not working as expected.

    When the image manager first appears, both upload and new folder are enabled at the root level even though in the custom provider I'm only returned Read. Delete is correctly disabled. ResolveRootDirectoryTree is called for the single root virtual path I supplied and I'm returning PathPermissions.Read ONLY. When I walk the return value and check my child directories,my other virtual sub directories are there and their permissions are set correctly. 

    I even temporarily changed it to return only Read for all directories, even my workspace. Yet New Folder and Upload remain enabled everywhere.

    The only thing that seems to be working properly is Delete.

    Also, how can I remove the up directory '..' from the my initial display at load? Right now it's letting them go back up one directory. Interestingly, that directory does have everything properly disabled.

    Reply

  • Telerik Admin admin's avatar

    Posted on Nov 6, 2008 (permalink)

    Hi,

    What happens when you click the new folder icon on the toolbar? Even if it is enabled, if you only have read permissions in the folder, nothing will happen after you click it (i.e. no popup asking you for a folder name). The same is true for the upload button - even if it is activated, nothing will happen when you click it if there are only read permissions for the folder.

    If you still have not resolved your issue, open a formal support ticket and send us a sample project with your custom content provider.


    Regards,
    Lini
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2009 Telerik. All rights reserved.