@@ -241,7 +241,7 @@ func (gamh GetAllMachineHandler) Handle(c echo.Context) error {
241241
242242 if tenant != nil {
243243 // Check if Tenant is privileged
244- if tenant . Config . TargetedInstanceCreation {
244+ if common . TenantHasTargetedInstanceCreation ( tenant ) {
245245 // Get IDs for all Providers the privileged Tenant has an account with
246246 taDAO := cdbm .NewTenantAccountDAO (gamh .dbSession )
247247 tas , _ , serr := taDAO .GetAll (ctx , nil , cdbm.TenantAccountFilterInput {
@@ -614,7 +614,7 @@ func (gmh GetMachineHandler) Handle(c echo.Context) error {
614614 isProviderOrPrivilegedTenant = true
615615 } else if tenant != nil {
616616 // Check if Tenant is privileged
617- if tenant . Config . TargetedInstanceCreation {
617+ if common . TenantHasTargetedInstanceCreation ( tenant ) {
618618 // Check if privileged Tenant has an account with Infrastructure Provider
619619 taDAO := cdbm .NewTenantAccountDAO (gmh .dbSession )
620620 _ , taCount , serr := taDAO .GetAll (ctx , nil , cdbm.TenantAccountFilterInput {
@@ -758,7 +758,7 @@ func (umh UpdateMachineHandler) Handle(c echo.Context) error {
758758 // Validate if Tenant is allowed to update Machine
759759 if tenant != nil {
760760 // Check if Tenant is privileged
761- if tenant . Config . TargetedInstanceCreation {
761+ if common . TenantHasTargetedInstanceCreation ( tenant ) {
762762 // Check if privileged Tenant has an account with Infrastructure Provider
763763 taDAO := cdbm .NewTenantAccountDAO (umh .dbSession )
764764 _ , taCount , serr := taDAO .GetAll (ctx , nil , cdbm.TenantAccountFilterInput {
0 commit comments