FindVisibleSubjectByUuid
Tests
| Test |
Duration |
Result |
| returnsAnySubjectForGlobalAdmin() |
0.006s |
passed |
| returnsEmptyForAssumedNonGlobalRole() |
0.006s |
passed |
| returnsEmptyForCrossRealmJwtGroupSubject() |
0.013s |
passed |
| returnsEmptyForSubjectOfAnotherRealm() |
0.005s |
passed |
| returnsSameRealmSubject() |
0.005s |
passed |
Standard output
2026-08-10T15:07:13.015Z INFO 373 --- [ Test worker] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [net.hostsharing.hsadminng.rbac.subject.RealSubjectRepositoryIntegrationTest$FindVisibleSubjectByUuid]: FindVisibleSubjectByUuid does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2026-08-10T15:07:13.018Z INFO 373 --- [ Test worker] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration net.hostsharing.hsadminng.HsadminNgApplication for test class net.hostsharing.hsadminng.rbac.subject.RealSubjectRepositoryIntegrationTest$FindVisibleSubjectByUuid
Hibernate: call base.defineContext(
cast(? as varchar(127)),
cast(? as text),
cast(? as varchar(63)),
cast(? as text),
cast(? as text));
Hibernate: select uuid from rbac.subject where name = ?
Hibernate: select *
from rbac.subject s
where s.uuid = ?
and(
s.deactivated_at is null
and (
rbac.hasGlobalAdminRole()
or (cardinality(base.assumedRoles()) = 0
and (
s.organization = (select currentSubject.organization
from rbac.subject currentSubject
where currentSubject.uuid = rbac.currentSubjectUuid())
or (s.type = 'GROUP'
and exists (
select 1
from hs_accounts.account ownAccount
join hs_accounts.account samePersonAccount
on samePersonAccount.person_uuid = ownAccount.person_uuid
join rbac.subject samePersonSubject
on samePersonSubject.uuid = samePersonAccount.uuid
where ownAccount.uuid = rbac.currentSubjectUuid()
and s.organization = samePersonSubject.organization
))
))
)
)
Hibernate: call base.defineContext(
cast(? as varchar(127)),
cast(? as text),
cast(? as varchar(63)),
cast(? as text),
cast(? as text));
Hibernate: select uuid from rbac.subject where name = ?
Hibernate: select *
from rbac.subject s
where s.uuid = ?
and(
s.deactivated_at is null
and (
rbac.hasGlobalAdminRole()
or (cardinality(base.assumedRoles()) = 0
and (
s.organization = (select currentSubject.organization
from rbac.subject currentSubject
where currentSubject.uuid = rbac.currentSubjectUuid())
or (s.type = 'GROUP'
and exists (
select 1
from hs_accounts.account ownAccount
join hs_accounts.account samePersonAccount
on samePersonAccount.person_uuid = ownAccount.person_uuid
join rbac.subject samePersonSubject
on samePersonSubject.uuid = samePersonAccount.uuid
where ownAccount.uuid = rbac.currentSubjectUuid()
and s.organization = samePersonSubject.organization
))
))
)
)
Hibernate: call base.defineContext(
cast(? as varchar(127)),
cast(? as text),
cast(? as varchar(63)),
cast(? as text),
cast(? as text));
Hibernate: select uuid from rbac.subject where name = ?
Hibernate: select *
from rbac.subject s
where s.uuid = ?
and(
s.deactivated_at is null
and (
rbac.hasGlobalAdminRole()
or (cardinality(base.assumedRoles()) = 0
and (
s.organization = (select currentSubject.organization
from rbac.subject currentSubject
where currentSubject.uuid = rbac.currentSubjectUuid())
or (s.type = 'GROUP'
and exists (
select 1
from hs_accounts.account ownAccount
join hs_accounts.account samePersonAccount
on samePersonAccount.person_uuid = ownAccount.person_uuid
join rbac.subject samePersonSubject
on samePersonSubject.uuid = samePersonAccount.uuid
where ownAccount.uuid = rbac.currentSubjectUuid()
and s.organization = samePersonSubject.organization
))
))
)
)
Hibernate: call base.defineContext(
cast(? as varchar(127)),
cast(? as text),
cast(? as varchar(63)),
cast(? as text),
cast(? as text));
Hibernate: select uuid from rbac.subject where name = ?
Hibernate: select *
from rbac.subject s
where s.uuid = ?
and(
s.deactivated_at is null
and (
rbac.hasGlobalAdminRole()
or (cardinality(base.assumedRoles()) = 0
and (
s.organization = (select currentSubject.organization
from rbac.subject currentSubject
where currentSubject.uuid = rbac.currentSubjectUuid())
or (s.type = 'GROUP'
and exists (
select 1
from hs_accounts.account ownAccount
join hs_accounts.account samePersonAccount
on samePersonAccount.person_uuid = ownAccount.person_uuid
join rbac.subject samePersonSubject
on samePersonSubject.uuid = samePersonAccount.uuid
where ownAccount.uuid = rbac.currentSubjectUuid()
and s.organization = samePersonSubject.organization
))
))
)
)
Hibernate: call base.defineContext(
cast(? as varchar(127)),
cast(? as text),
cast(? as varchar(63)),
cast(? as text),
cast(? as text));
Hibernate: select uuid from rbac.subject where name = ?
Hibernate: select *
from rbac.subject s
where s.uuid = ?
and(
s.deactivated_at is null
and (
rbac.hasGlobalAdminRole()
or (cardinality(base.assumedRoles()) = 0
and (
s.organization = (select currentSubject.organization
from rbac.subject currentSubject
where currentSubject.uuid = rbac.currentSubjectUuid())
or (s.type = 'GROUP'
and exists (
select 1
from hs_accounts.account ownAccount
join hs_accounts.account samePersonAccount
on samePersonAccount.person_uuid = ownAccount.person_uuid
join rbac.subject samePersonSubject
on samePersonSubject.uuid = samePersonAccount.uuid
where ownAccount.uuid = rbac.currentSubjectUuid()
and s.organization = samePersonSubject.organization
))
))
)
)