public IActionResult Index() { if (_identityUIUserInfoService.HasPermission(IdentityUIPermissions.IDENTITY_UI_CAN_MANAGE_GROUPS)) { return(View()); } return(RedirectToAction(nameof(User), new { id = _identityUIUserInfoService.GetGroupId() })); }
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); }
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); }
public override string GetGroupIdentifier() { return(_identityUIUserInfoService.GetGroupId()); }