Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Are you really really sure you want to do that? Setting access rights on user level quickly becomes an administrative nightmare. :)
If you do want to do it anyway...
var _securityRepository = ServiceLocator.Current.GetInstance<IContentSecurityRepository>(); var startPageSecurity = _securityRepository.Get(ContentReference.StartPage).CreateWritableClone() as IContentSecurityDescriptor; if (startPageSecurity != null) { if (startPageSecurity.IsInherited) startPageSecurity.ToLocal(); startPageSecurity.AddEntry(new AccessControlEntry("daniel.ovaska", AccessLevel.Read, SecurityEntityType.User)); _securityRepository.Save(startPageSecurity.ContentLink, startPageSecurity, SecuritySaveType.Replace); }
Yes Daniel Ovaska, I am creating custom access right settings page for admin users. thanks its working fine.
This Post - http://world.episerver.com/forum/developer-forum/-EPiServer-75-CMS/Thread-Container/2014/2/Programmatically-setting-access-rights-for-assets-folder/ working for groups, not for individual user, any idea why its not working for users?
any other approach to achive this?