Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Saving acess for media asset not affecting

Vote:
 

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.

#146533
Mar 17, 2016 11:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.