Before I can recommend buying this product, can someone tell me if this is possible.
I have only 2 folders, Public and Private. Users can see and download from public, but should not be able to upload.
They should be able to upload to private. I added an ACL setting FileUpload=true on private, which should override the value set at the root, correct? Yet I can't upload into either folder, so long as the root acl is set to false. Any ideas?
type = ResourceType.Add( "Public" );
type.Url = BaseUrl + "Public/";
type.Dir = BaseDir == "" ? "" : BaseDir + "Public/";
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
type.DeniedExtensions = new string[] { };
type = ResourceType.Add( "Private" );
type.Url = BaseUrl + "Private/";
type.Dir = BaseDir == "" ? "" : BaseDir + "Private/";
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
type.DeniedExtensions = new string[] { };
//ROOT
AccessControl acl = AccessControl.Add();
acl.Role = "*";
acl.ResourceType = "*";
acl.Folder = "/";
acl.FolderView = true;
acl.FolderCreate = false;
acl.FolderRename = false;
acl.FolderDelete = false;
acl.FileView = true;
acl.FileUpload = false;
acl.FileRename = false;
acl.FileDelete = false;
//PUBLIC
AccessControl acl1 = AccessControl.Add();
acl1.Role = "*";
acl1.ResourceType = "Public";
acl1.Folder = "/Public";
acl1.FolderView = false;
acl1.FolderCreate = false;
acl1.FolderRename = false;
acl1.FolderDelete = false;
acl1.FileView = true;
acl1.FileUpload = false;
acl1.FileRename = false;
acl1.FileDelete = false;
//PRIVATE
AccessControl acl2 = AccessControl.Add();
acl2.Role = "*";
acl2.ResourceType = "Private";
acl2.Folder = "/Private";
acl2.FolderView = true;
acl2.FolderCreate = true;
acl2.FolderRename = true;
acl2.FolderDelete = true;
acl2.FileView = true;
acl2.FileUpload = true; //Does not seem to work
acl2.FileRename = true;
acl2.FileDelete = true;
Tue, 06/03/2014 - 21:08
#1
It looks like you properly
It looks like you properly defined separate resource types and confused only the ACL settings. The folder specified in ACL (acl.folder) should be relative to the location of resource type, so "/Public" and "/Private" is wrong there, use "/" instead:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+