public IActionResult Index()
        {
            if (_identityUIUserInfoService.HasPermission(IdentityUIPermissions.IDENTITY_UI_CAN_MANAGE_GROUPS))
            {
                return(View());
            }

            return(RedirectToAction(nameof(User), new { id = _identityUIUserInfoService.GetGroupId() }));
        }
Exemple #2
0
        private TSpecification ApplayGroupFilter <TSpecification>(TSpecification specification)
            where TSpecification : BaseSpecification <GroupEntity>
        {
            if (_identityUIUserInfoService.HasPermission(IdentityUIPermissions.IDENTITY_UI_CAN_MANAGE_GROUPS))
            {
            }
            else if (_identityUIUserInfoService.GetGroupId() != null)
            {
                specification.AddFilter(x => x.Id == _identityUIUserInfoService.GetGroupId());
            }
            else
            {
                specification.AddFilter(x => false);
            }

            return(specification);
        }
Exemple #3
0
        private TSpecification ApplayGroupUserFilter <TSpecification>(TSpecification specification)
            where TSpecification : BaseSpecification <GroupUserEntity>
        {
            if (_identityUIUserInfoService.HasPermission(IdentityUIPermissions.GROUP_CAN_SEE_USERS))
            {
            }
            else if (_identityUIUserInfoService.HasGroupPermission(IdentityUIPermissions.GROUP_CAN_SEE_USERS) &&
                     _identityUIUserInfoService.GetGroupId() != null)
            {
                specification.AddFilter(x => x.GroupId == _identityUIUserInfoService.GetGroupId());
            }
            else
            {
                specification.AddFilter(x => false);
            }

            return(specification);
        }
Exemple #4
0
 public override string GetGroupIdentifier()
 {
     return(_identityUIUserInfoService.GetGroupId());
 }