Esempio n. 1
0
        IListModel <VisualizedAuditEvent, NotificationsGetModel> NotificationsModel(NotificationsGetModel get)
        {
            throw new Lpp.Utilities.CodeToBeUpdatedException();

            //var from = DateTime.Today.AddDays(-get.GetPeriodDaysBack());
            //var kind = get.GetKindFilter();
            //var myKind = kind.Kind == MaybeKind.Value ?
            //    new Func<AuditEventKind, bool>(e => e.Id == kind.Value)
            //    : (_ => true);

            //var notificationsFilter = (from s in Auth.CurrentUser.Subscriptions
            //                           from ff in Audit.DeserializeFilters(s.FiltersDefinitionXml)
            //                           where myKind(ff.Key)
            //                           group ff by ff.Key into filtersForKind
            //                           from filters in filtersForKind
            //                           from filter in filters
            //                           select new { filtersForKind.Key, filter }
            //                          )
            //                          .ToLookup(x => x.Key, x => x.filter);

            //return Audit
            //    .GetEvents(from, null, notificationsFilter)
            //    .RequirePermission(notificationsFilter.Select(k => k.Key), Security, SecPrivileges.Event.Observe, Auth.CurrentUser)
            //    .ListModel(get, _eventSort, 10)
            //    .Map(ee => AuditUI.Visualize(AuditUIScope.Display, ee));
        }
Esempio n. 2
0
 public ActionResult NotificationsBody(NotificationsGetModel get)
 {
     return(Mvc.View.Result <Views.Home.NotificationsBody>().WithModel(NotificationsModel(get)));
 }