Issue: bug(users): Check lineage across entities in invite

Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
We should check if user exists across lineage before allowing invite in this case.



Resolution: <think>
PR Context:
- Title: fix(users): Check lineage across entities in invite
- Merged: 2024-11-27T14:33:37Z
- Files changed: 1 files
- Commits: 2 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
This PR fixes it.

### Additional Changes

- [ ] This PR modifies the API contract
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** fix(users): Check lineage across entities in invite (#6677)
Files to modify:


**crates/router/src/core/user.rs**
  Modify existing code