Handle update user permissions - Follow-up from "DAST On-demand Scheduler - Implement Scheduling"
Dast::ProfileSchedules belongs to the users. We need to handle the situation when the user is disabled or downgraded.
Parent Issue link - #330307 (closed)
The following discussion from !65327 (merged) should be addressed:
-
@philipcunningham started a discussion: (+2 comments) thought
i don't think this is something we need to address now but one thing we'll want to consider is what happens when a user's permission changes (e.g. they're downgraded to a guest or removed from a project).
problem
The scheduled job can't run without a user as described here and here
backend proposal
-
Use the ability check and the null
-check to verify if the owner is valid. The frontend team will use this attribute to display the error message on the dashboard. -
Capture the failed schedule -
Update AppSec::Dast::ProfileScheduleWorker#perform to set the active attribute to false when the owner is not valid
-
-
Reassign ownership when the scan is updated if the owner is not valid.
Edited by Marcos Rocha