diff --git a/src/main/kotlin/com/terraformation/backend/customer/model/IndividualUser.kt b/src/main/kotlin/com/terraformation/backend/customer/model/IndividualUser.kt index e6d03d53bbd..c1eefbf022d 100644 --- a/src/main/kotlin/com/terraformation/backend/customer/model/IndividualUser.kt +++ b/src/main/kotlin/com/terraformation/backend/customer/model/IndividualUser.kt @@ -791,14 +791,14 @@ data class IndividualUser( /** Returns true if one of the user's global roles allows them to read an organization. */ private fun isGlobalReader(organizationId: OrganizationId) = - isSuperAdmin() || + GlobalRole.SuperAdmin in globalRoles || (isReadOnlyOrHigher() && (parentStore.hasInternalTag(organizationId, InternalTagIds.Accelerator) || parentStore.hasApplications(organizationId))) /** Returns true if one of the user's global roles allows them to write to an organization. */ private fun isGlobalWriter(organizationId: OrganizationId) = - isSuperAdmin() || + GlobalRole.SuperAdmin in globalRoles || (isTFExpertOrHigher() && (parentStore.hasInternalTag(organizationId, InternalTagIds.Accelerator) || parentStore.hasApplications(organizationId)))