Generalise authorisation hooks for DAST On-Demand scan mutations
The following discussion from !37536 (merged) should be addressed:
-
@craigmsmith started a discussion: Note: I'm starting to notice that all the on-demand scans call
authorize :run_ondemand_dast_scan,authorized_find!andraise_resource_not_available_error! unless Feature.enabled?(:security_on_demand_scans_feature_flag, project)I don't think it requires a change in this MR but once !37382 (merged) has been merged WDYT about creating an
OnDemandScanMutationor possibly renamingauthorized_find!toauthorized_find_project!and moving it toResolvesProject?