FindVisibleSubjectByUuid

5

tests

0

failures

0

ignored

0.035s

duration

100%

successful

Tests

Test Duration Result
returnsAnySubjectForGlobalAdmin() 0.008s passed
returnsEmptyForAssumedNonGlobalRole() 0.005s passed
returnsEmptyForCrossRealmJwtGroupSubject() 0.011s passed
returnsEmptyForSubjectOfAnotherRealm() 0.006s passed
returnsSameRealmSubject() 0.005s passed

Standard output

2026-08-10T16:32:54.855Z  INFO 374 --- [    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-10T16:32:54.858Z  INFO 374 --- [    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
                    ))
            ))
    )
)