public IndexViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.FirmaPage firmaPage, string gridDataUrl, List <SelectListItem> activeOnlyOrAllUsersSelectListItems) : base(currentFirmaSession, firmaPage) { PageTitle = "Users"; GridSpec = new IndexGridSpec(currentFirmaSession) { ObjectNameSingular = "User", ObjectNamePlural = "Users", SaveFiltersInCookie = true }; GridName = "UserGrid"; GridDataUrl = gridDataUrl; InviteUserUrl = SitkaRoute <UserController> .BuildUrlFromExpression(x => x.Invite()); UserIsFirmaAdmin = new FirmaAdminFeature().HasPermissionByFirmaSession(currentFirmaSession); ActiveOnlyOrAllUsersSelectListItems = activeOnlyOrAllUsersSelectListItems; ShowOnlyActiveOrAll = "ShowOnlyActiveOrAll"; }
public IndexViewData(Person currentPerson) : base(currentPerson) { PageTitle = "Users and Contacts"; GridSpec = new IndexGridSpec(currentPerson) { ObjectNameSingular = "Person", ObjectNamePlural = "People", SaveFiltersInCookie = true }; GridName = "UserGrid"; GridDataUrl = SitkaRoute <UserController> .BuildUrlFromExpression(tc => tc.IndexGridJsonData()); SAWUrl = FirmaWebConfiguration.SAWUrl; UserIsSitkaAdmin = new SitkaAdminFeature().HasPermissionByPerson(currentPerson); AddContactUrl = SitkaRoute <UserController> .BuildUrlFromExpression(x => x.AddContact()); UserCanAddContact = new ContactCreateAndViewFeature().HasPermissionByPerson(currentPerson); }