@@ -27,13 +27,13 @@ import (
27
27
// - there are no missing permissions
28
28
// - there are no image permissions denied (if ImageRoleAuthorizations are enabled)
29
29
// - the image is allowed by the image allow rules (if enabled)
30
- func CopyPromoteStagedAppImage (req router.Request , resp router.Response ) error {
30
+ func CopyPromoteStagedAppImage (req router.Request , _ router.Response ) error {
31
31
app := req .Object .(* v1.AppInstance )
32
32
if app .Status .Staged .AppImage .ID != "" &&
33
33
app .Status .Staged .PermissionsChecked &&
34
34
len (app .Status .Staged .PermissionsMissing ) == 0 &&
35
35
len (app .Status .Staged .ImagePermissionsDenied ) == 0 &&
36
- z.Dereference [ bool ] (app .Status .Staged .ImageAllowed ) {
36
+ z .Dereference (app .Status .Staged .ImageAllowed ) {
37
37
app .Status .AppImage = app .Status .Staged .AppImage
38
38
app .Status .Permissions = app .Status .Staged .AppScopedPermissions
39
39
}
@@ -63,9 +63,8 @@ func CheckPermissions(req router.Request, _ router.Response) error {
63
63
}
64
64
65
65
// Early exit
66
- if (app .Status .Staged .AppImage .ID == "" ||
67
- app .Status .Staged .AppImage .Digest == app .Status .AppImage .Digest ) &&
68
- app .Status .Staged .PermissionsObservedGeneration == app .Generation {
66
+ if app .Status .Staged .AppImage .ID == "" ||
67
+ app .Status .Staged .AppImage .Digest == app .Status .AppImage .Digest && app .Status .Staged .PermissionsObservedGeneration == app .Generation {
69
68
// IAR disabled? Allow the Image if we're not re-checking permissions
70
69
if enabled , err := config .GetFeature (req .Ctx , req .Client , profiles .FeatureImageAllowRules ); err != nil {
71
70
return err
0 commit comments