コード例 #1
0
        public IActionResult Index()
        {
            if (_identityUIUserInfoService.HasPermission(IdentityUIPermissions.IDENTITY_UI_CAN_MANAGE_GROUPS))
            {
                return(View());
            }

            return(RedirectToAction(nameof(User), new { id = _identityUIUserInfoService.GetGroupId() }));
        }
コード例 #2
0
ファイル: GroupStore.cs プロジェクト: weedkiller/IdentityUI
        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);
        }
コード例 #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);
        }
コード例 #4
0
 public override string GetGroupIdentifier()
 {
     return(_identityUIUserInfoService.GetGroupId());
 }