@@ -74,9 +74,9 @@ type BulkUpdateService interface {
74
74
BulkUpdateSecret (bulkUpdatePayload * bean4.BulkUpdatePayload , userMetadata * bean6.UserMetadata ) * bean4.CmAndSecretBulkUpdateResponse
75
75
BulkUpdate (bulkUpdateRequest * bean4.BulkUpdatePayload , userMetadata * bean6.UserMetadata ) (bulkUpdateResponse * bean4.BulkUpdateResponse )
76
76
// BulkHibernate deprecated
77
- BulkHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , token string , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool , userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error )
78
- BulkHibernateV1 (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , token string , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool , userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error )
79
- BulkUnHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , token string , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool , userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error )
77
+ BulkHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool , userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error )
78
+ BulkHibernateV1 (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool , userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error )
79
+ BulkUnHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool , userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error )
80
80
BulkDeploy (request * bean4.BulkApplicationForEnvironmentPayload , token string , checkAuthBatch func (token string , appObject []string , envObject []string ) (map [string ]bool , map [string ]bool ), userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationForEnvironmentResponse , error )
81
81
BulkBuildTrigger (request * bean4.BulkApplicationForEnvironmentPayload , ctx context.Context , w http.ResponseWriter , token string , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool ) (* bean4.BulkApplicationForEnvironmentResponse , error )
82
82
@@ -988,7 +988,7 @@ func (impl BulkUpdateServiceImpl) BulkUpdate(bulkUpdatePayload *bean4.BulkUpdate
988
988
return bulkUpdateResponse
989
989
}
990
990
991
- func (impl BulkUpdateServiceImpl ) BulkHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , token string , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool ,
991
+ func (impl BulkUpdateServiceImpl ) BulkHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool ,
992
992
userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error ) {
993
993
var pipelines []* pipelineConfig.Pipeline
994
994
var err error
@@ -1024,7 +1024,7 @@ func (impl BulkUpdateServiceImpl) BulkHibernate(ctx context.Context, request *be
1024
1024
}
1025
1025
appObject := impl .enforcerUtil .GetAppRBACNameByAppId (pipeline .AppId )
1026
1026
envObject := impl .enforcerUtil .GetEnvRBACNameByAppId (pipeline .AppId , pipeline .EnvironmentId )
1027
- isValidAuth := checkAuthForBulkActions (token , appObject , envObject )
1027
+ isValidAuth := checkAuthForBulkActions (util2 . GetTokenFromContext ( ctx ) , appObject , envObject )
1028
1028
if ! isValidAuth {
1029
1029
//skip hibernate for the app if user does not have access on that
1030
1030
pipelineResponse := response [appKey ]
@@ -1145,7 +1145,7 @@ func (impl BulkUpdateServiceImpl) buildHibernateUnHibernateRequestForHelmPipelin
1145
1145
}
1146
1146
return appIdentifier , hibernateRequest , nil
1147
1147
}
1148
- func (impl BulkUpdateServiceImpl ) BulkUnHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , token string , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool ,
1148
+ func (impl BulkUpdateServiceImpl ) BulkUnHibernate (ctx context.Context , request * bean4.BulkApplicationForEnvironmentPayload , checkAuthForBulkActions func (token string , appObject string , envObject string ) bool ,
1149
1149
userMetadata * bean6.UserMetadata ) (* bean4.BulkApplicationHibernateUnhibernateForEnvironmentResponse , error ) {
1150
1150
var pipelines []* pipelineConfig.Pipeline
1151
1151
var err error
@@ -1180,7 +1180,7 @@ func (impl BulkUpdateServiceImpl) BulkUnHibernate(ctx context.Context, request *
1180
1180
}
1181
1181
appObject := impl .enforcerUtil .GetAppRBACNameByAppId (pipeline .AppId )
1182
1182
envObject := impl .enforcerUtil .GetEnvRBACNameByAppId (pipeline .AppId , pipeline .EnvironmentId )
1183
- isValidAuth := checkAuthForBulkActions (token , appObject , envObject )
1183
+ isValidAuth := checkAuthForBulkActions (util2 . GetTokenFromContext ( ctx ) , appObject , envObject )
1184
1184
if ! isValidAuth {
1185
1185
//skip hibernate for the app if user does not have access on that
1186
1186
pipelineResponse := response [appKey ]
0 commit comments