Restrict User to upload image in to specific Category..

Last post 03-07-2014, 8:06 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  03-06-2014, 1:04 AM 80020

    Restrict User to upload image in to specific Category..

     Hi,

     

                I am using Image Gallery (Classic Layout). In the Gallery I created some categories like Pages, Emails, Banners

    etc. I removed the right click functionality for those categories and the images in that categories. Now my

     

    requirement is that I didn't allow the user to upload new images in to that categories (Pages, Emails, Banners etc.).

     

    But user can create new category and upload images in to that or User can upload images into Default folder. But

     

    User can't able to modify(Edit, Delete) the categories and Images in those categories. How can I restrict the user. 

     

    Please try to give quick reply..

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  03-06-2014, 8:36 AM 80028 in reply to 80020

    Re: Restrict User to upload image in to specific Category..

    Hi narendrababu,

     

    1. Please open file\CuteSoft_Client\Gallery\Editor\Explorer\Code.js, find the function below

     

    function SelectCategory(category) {}

     

    2. Add the code below into the function above, then it will hide the upload button when user click on any category except "default".

     

    1. if (category.Title != null) {  
    2.   
    3.     uploadbtn.style.visibility = "hidden";  
    4. }  
    5. else {  
    6.     uploadbtn.style.visibility = "visible";  
    7. }  
     

    Regards,

     

    Ken 

  •  03-06-2014, 8:48 AM 80029 in reply to 80028

    Re: Restrict User to upload image in to specific Category..

    Hi,

     

              Thanks for your reply. But I want to able to upload images into Default folder and If I created any new categories the I can able to

     

    upload images in to those new categories. I want to put restrictions for particular categories only (Example Pages, Emails Categories only

     

    I want to restrict). If put the above provided code in my file. If I click on default folder 'Upload Files' button is hiding. But it should not be 

     

    like that. When I select the Pages or Emails categories then 'Upload Files' button should be hide.

     

    Finally I want to say that Please provide me one condition If particular categories (pages, emails) selected upload button should be in

     

    hidden mode, If I select other categories or Default category then it should be in visible mode.

     

    Please give me quick solution I am waiting for your valuable reply.. 


    Regards,
    Narendra
  •  03-07-2014, 8:06 AM 80037 in reply to 80029

    Re: Restrict User to upload image in to specific Category..

    hi,

     

    How to hide the upload button for particular category.

     

    if (category.Title == "pages"{  

      

        uploadbtn.style.visibility = "hidden";  

    }  

    else {  

        uploadbtn.style.visibility = "visible";  

    }  

     

    Regards,

     

    Ken 

View as RSS news feed in XML