public GalleryViewModel( AlbumViewModel currentUserAlbum, IList<AlbumViewModel> otherPeopleAlbums, AlbumListViewModel standardAlbums, AlbumViewModel selected ) { this.CurrentUserAlbum = currentUserAlbum; this.OtherPeopleAlbums = otherPeopleAlbums.AsReadOnly(); this.StandardAlbums = standardAlbums; this.Selected = selected; }
public bool IsSelected(AlbumViewModel albumModel) { return this.Selected != null && this.Selected == albumModel; }
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) ); }