示例#1
0
        public virtual PartialViewResult MyGroupsList()
        {
            // TODO - OutputCache and add clear to post/topic/Group delete/create/edit

            var loggedOnUsersRole = LoggedOnReadOnlyUser.GetRole(RoleService);
            var catViewModel      = new GroupListSummaryViewModel
            {
                AllPermissionSets =
                    ViewModelMapping.GetPermissionsForGroups(_groupService.GetAllMyGroupsInSummary(LoggedOnReadOnlyUser.Id),
                                                             _roleService, loggedOnUsersRole)
            };

            return(PartialView("_MyGroups", catViewModel));
        }
示例#2
0
        public virtual PartialViewResult ListMainGroups()
        {
            // TODO - OutputCache and add clear to post/topic/Group delete/create/edit
            if (LoggedOnReadOnlyUser is null)
            {
                throw new ArgumentNullException(nameof(LoggedOnReadOnlyUser));
            }

            var loggedOnUsersRole = LoggedOnReadOnlyUser.GetRole(RoleService);
            var catViewModel      = new GroupListSummaryViewModel
            {
                AllPermissionSets =
                    ViewModelMapping.GetPermissionsForGroups(_groupService.GetAllMainGroupsInSummary(LoggedOnReadOnlyUser.Id),
                                                             _roleService, loggedOnUsersRole)
            };

            return(PartialView(catViewModel));
        }