Re: User defined upload and gallery

  •  07-20-2010, 12:51 PM

    Re: User defined upload and gallery

    You need to implement your own methods based on your project to detect the current user security role, GetSecurityRoleFromYourAPP will return user role:

       string userrole= GetSecurityRoleFromYourAPP();
       switch(userrole)
       {
        case "Administrators":
         Editor1.SecurityPolicyFile  = "Admin.config";
         SetUploadsFolder("~/Uploads/");
         break;
        case "Members":
         Editor1.SecurityPolicyFile  = "default.config";
         SetUploadsFolder("~/Uploads/Member/");
         break;
        case "Guest":
         Editor1.SecurityPolicyFile  = "Guest.config";
         SetUploadsFolder("~/Uploads/Guest/");
         break;
      //  case "Banned":
      //   Editor1.ReadOnly = true;
      //   break;

         case "John":
         Editor1.SecurityPolicyFile  = "Admin.config";
         SetUploadsFolder("~/Uploads/Users/John/");
         break;
        case "Mary":
         Editor1.SecurityPolicyFile  = "default.config";
         SetUploadsFolder("~/Uploads/Users/Mary/");
         break;
        case "Tim":
         Editor1.SecurityPolicyFile  = "default.config";
         SetUploadsFolder("~/Uploads/Users/Tim/");
         break;
       }
     
     
    Regards,
    Eric
View Complete Thread