+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Image and document library for each user

Image and document library for each user

4 posts, 0 answered
  1. Gary
    Gary avatar
    91 posts
    Registered:
    19 Jul 2007
    20 Mar 2011
    Link to this post
    I have implemented a custom library provider to filter the available libraries so that select users may only access libraries that they own.

    I have named the images libraries the same as each username, and the document libraries are named as the username plus "-doc".

    I have two problems:

    1. When accessing the insert / manage document dialog, I want to automatically select "username-docs" library, andfor the insert / manage image dialog, I want to selected the "username" library.

    2. I want to remove the ability to upload and manage files to the file system.

    Regards,
    Gary
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Mar 2011
    Link to this post
    Hello Gary,

    1. You need to create  a custom selector that browsers the library you want. You should inherit from ItemSelector. In your custom class you have to override CreateChildControls and implement your logic for binding the libraries.
     
    2. You can do this in your custom selector

    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/developing-with-sitefinity/custom-page-selector.aspx

    Kind regards,
    Ivan Dimitrov
    the Telerik team
  3. Gary
    Gary avatar
    91 posts
    Registered:
    19 Jul 2007
    23 Mar 2011
    Link to this post
    Thank you, Ivan.

    I've incorporated a custom selector that inherits from ItemSelector by referencing my custom class from ImageDialog.ascx.

    You said I should override CreateChildControls to implement my logic for binding the libraries. However, I have not been able to figure out what code to write. Could you provide a bit more detail on this please?

    Thanks,
    Gary
     
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 Mar 2011
    Link to this post
    Hello Gary,

    In the template of ItemSelector (Sitefinity/Admin/ControlTemplates/Libraries/Dialogs/ItemSelector.ascx) there is a control - librariesList which you should bind to the datasource that is filtered based on the current user.

    Greetings,
    Ivan Dimitrov
    the Telerik team
Register for webinar
4 posts, 0 answered