API Questions on Kentico API.
Version 5.x > API > Setting Document Security Permissions View modes: 
User avatar
Certified Developer 13
Certified Developer 13
sean - 9/1/2011 3:45:52 PM
   
Setting Document Security Permissions
hi everyone,

I'm hoping someone can lead me in the right direction. I would like to programmatically create documents (pages) that allow only a specific user to access them. I was wondering how to go about changing the security permissions of a document using the api.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/5/2011 4:05:16 AM
   
RE:Setting Document Security Permissions
Hi,

you can find inspiration in the control ~/CMSModules/Content/Controls/Security.ascx.cs in its Save() method. You can set permissions using AclProvider.SetUserPermissions or AclProvider.SetRolePermissions. This control updates permissions of document - you can see its functionality in Properties of document - Security tab.

Best regards,
Ivana Tomanickova