@@ -666,7 +666,7 @@ func GetAuditPlans(c echo.Context) error {
666666 "offset" : offset ,
667667 }
668668 if ! up .CanViewProject () {
669- instanceNames , err := dms .GetInstanceNamesInProjectByIds (c .Request ().Context (), projectUid , up .GetInstancesByOP (v1 .OpPermissionTypeViewOtherAuditPlan ))
669+ instanceNames , err := dms .GetInstanceNamesInProjectByIds (c .Request ().Context (), projectUid , up .GetInstancesByOP (v1 .OpPermissionTypeSaveAuditPlan ))
670670 if err != nil {
671671 return err
672672 }
@@ -797,7 +797,7 @@ func GetAuditPlanReports(c echo.Context) error {
797797 }
798798 apName := c .Param ("audit_plan_name" )
799799
800- _ , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeViewOtherAuditPlan )
800+ _ , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeSaveAuditPlan )
801801 if err != nil {
802802 return controller .JSONBaseErrorReq (c , err )
803803 }
@@ -857,7 +857,7 @@ func GetAuditPlanReport(c echo.Context) error {
857857 }
858858 apName := c .Param ("audit_plan_name" )
859859
860- ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeViewOtherAuditPlan )
860+ ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeSaveAuditPlan )
861861 if err != nil {
862862 return controller .JSONBaseErrorReq (c , err )
863863 }
@@ -1225,7 +1225,7 @@ func GetAuditPlanNotifyConfig(c echo.Context) error {
12251225 }
12261226 apName := c .Param ("audit_plan_name" )
12271227
1228- ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeViewOtherAuditPlan )
1228+ ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeSaveAuditPlan )
12291229 if err != nil {
12301230 return controller .JSONBaseErrorReq (c , err )
12311231 }
@@ -1401,7 +1401,7 @@ func GetAuditPlanSQLs(c echo.Context) error {
14011401 }
14021402 apName := c .Param ("audit_plan_name" )
14031403
1404- ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeViewOtherAuditPlan )
1404+ ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeSaveAuditPlan )
14051405 if err != nil {
14061406 return controller .JSONBaseErrorReq (c , err )
14071407 }
@@ -1482,7 +1482,7 @@ func GetAuditPlanReportSQLsV1(c echo.Context) error {
14821482 }
14831483 apName := c .Param ("audit_plan_name" )
14841484
1485- ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeViewOtherAuditPlan )
1485+ ap , exist , err := GetAuditPlanIfCurrentUserCanView (c , projectUid , apName , v1 .OpPermissionTypeSaveAuditPlan )
14861486 if err != nil {
14871487 return controller .JSONBaseErrorReq (c , err )
14881488 }
0 commit comments