1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Problem assigning roles to album

Problem assigning roles to album

1 posts, 0 answered
  1. Allan
    Allan avatar
    0 posts
    Registered:
    01 Jul 2015
    09 Dec 2016
    Link to this post

    Hi,

    I tried to set permission to an album inside a library but it is not working. Just a simple code below breaking the inheritance is also not working. Does anyone know what is wrong?

    public void SetPermissionForImageLibrary(Guid albumId)
           {
               var album = App.WorkWith().Album(albumId).Get();
     
               LibrariesManager manager = LibrariesManager.GetManager();
               manager.BreakPermiossionsInheritance(album);
     
               manager.SaveChanges();
           }

1 posts, 0 answered