Ejemplo n.º 1
0
 public GalleryViewModel(
     AlbumViewModel currentUserAlbum,
     IList<AlbumViewModel> otherPeopleAlbums,
     AlbumListViewModel standardAlbums,
     AlbumViewModel selected
     )
 {
     this.CurrentUserAlbum = currentUserAlbum;
     this.OtherPeopleAlbums = otherPeopleAlbums.AsReadOnly();
     this.StandardAlbums = standardAlbums;
     this.Selected = selected;
 }
Ejemplo n.º 2
0
 public bool IsSelected(AlbumViewModel albumModel)
 {
     return this.Selected != null
         && this.Selected == albumModel;
 }
Ejemplo n.º 3
0
        private void SetupSecurityManagement(AlbumViewModel model)
        {
            if (!authorization.IsAuthorized(this.User, SecurableActions.ManageSecurity))
                return;

            model.SetupSecurityManagement(
                from userOrGroup in this.authorization.GetAuthorizedTo(SecurableActions.View(model.Album))
                where !(userOrGroup is AnonymousMember)
                select new UserGroupViewModel(userOrGroup)
            );
        }