Example #1
0
        public async Task <ActionResult> Index()
        {
            var roles       = (await _roleAppService.GetAllAsync(new PagedAndSortedResultRequestDto())).Items;
            var permissions = (await _roleAppService.GetAllPermissions()).Items;
            var model       = new RoleListViewModel
            {
                Roles       = roles,
                Permissions = permissions
            };

            return(View(model));
        }
Example #2
0
        public async Task <IActionResult> Index()
        {
            var roles       = (await _roleAppService.GetRolesAsync(new GetRolesInput())).Items;
            var permissions = (await _roleAppService.GetAllPermissions()).Items;
            var model       = new RoleListViewModel
            {
                Roles       = roles,
                Permissions = permissions
            };

            return(View(model));
        }
        public async Task <ActionResult> Index()
        {
            var roles       = (await _roleAppService.GetAll(new PagedAndSortedResultRequestDto())).Items;
            var permissions = (await _roleAppService.GetAllPermissions()).Items;

            List <SysCategory> cateList = _roleAppService.GetSysCategoryAccordingRoleID();

            cateList.Remove(SysCategory.ALL);
            var model = new RoleListViewModel
            {
                Roles       = roles,
                Permissions = permissions,
                SysCateIDs  = cateList,
            };

            return(View(model));
        }
Example #4
0
        public async Task <IActionResult> Index()
        {
            var roles       = (await _roleAppService.GetAll(new PagedAndSortedResultRequestDto())).Items;
            var permissions = (await _roleAppService.GetAllPermissions()).Items;

            foreach (var role in roles)
            {
                var grantedPermissions = (await _roleAppService.GetGrantedPermissionsAsync(role.Id));
                role.Permissions.Clear();
                role.Permissions.AddRange(grantedPermissions);
            }

            var model = new RoleListViewModel
            {
                Roles       = roles,
                Permissions = permissions
            };

            return(View(model));
        }
Example #5
0
        public async Task <ActionResult> Index()
        {
            var roles       = (await _roleAppService.GetAll(new PagedAndSortedResultRequestDto())).Items;
            var permissions = (await _roleAppService.GetAllPermissions()).Items;
            var model       = new RoleListViewModel
            {
                Roles       = roles,
                Permissions = permissions[0].Children.Where(p => p.Name != PermissionNames.Pages_Tenants).ToList()
            };
            var userMenu = GetUserMenu(PageNames.Roles).Result;

            ViewBag.UserMenu = userMenu;

            return(View(model));
        }
Example #6
0
        public async Task <IActionResult> Index()
        {
            var permissions = (await _roleAppService.GetAllPermissions()).Items; //PermissionManager.GetAllPermissions(false);

            return(View(permissions));
        }
Example #7
0
        public async Task <PartialViewResult> PermissionsSelection()
        {
            var list = await _roleAppService.GetAllPermissions();

            return(PartialView("_PermissionsSelection", list));
        }
        public async Task <ActionResult> Add()
        {
            var pers = (await _roleAppService.GetAllPermissions()).Items;

            return(View(pers));
        }