Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
I have set acess for some media files but its not affecting in the media folder.
var securityRepository = ServiceLocator.Current.GetInstance();
var contentReference = new ContentReference(int.Parse(key));
var folderSecurity = securityRepository.Get(contentReference).CreateWritableClone() as IContentSecurityDescriptor;
if (folderSecurity != null)
{
if (folderSecurity.IsInherited) folderSecurity.ToLocal();
folderSecurity.AddEntry(new AccessControlEntry("user1", AccessLevel.Read));
securityRepository.Save(contentReference, folderSecurity, SecuritySaveType.Replace);
}
But i saw that its saving and reflecting in Set access UI , but the folder is not showing up media folder.