can_update is a special model getter that checks to see if the project
is in a valid state it looks like - so it's important to check this for
superusers too. The can_change check does the implicit is_superuser
check for us, so we don't need another expclit check here, just
can_start protection.
In old_access.py we restricted even super users from doing this. I'm not
sure that it'd actually break anything to allow this, but I'm making the
new access.py behave like old_access.py for good measure until we have a
valid usecase for this.
This deep copy would cause ansible-playbook to get hung up and fail to
spawn new subprocesses thus forcing extremely large scan jobs to
serialize their connections through one process. This had the effect
of forcing `forks=1` behavior.
This change was for citco, a customer who is running scan jobs against
600 hosts with a forks value of 200.
as it should have always been. This messes up being able to post to
api/v1/users/:n/credentials and api/v1/teams/:n/credentials without
specifyign the user/team id in the post body, but looking at the old
code it looks like this might have always been the case, so whatevs..
This fixes a old v new access.py test "failure", and is better anyways..
This test was passing before because we were erroneously making all
users organization auditors, which gave users read access to all JT's
under the org.
This step ensures all of our roles get setup before we start the
migration. It also speeds things up a little as we can wrap everything
with a `with batch_role_ancestor_rebuilding()`. We were pretty much
doing this already, but we had an issue where we didn't catch all job
templates all the time, so this just makes it very explicit and ensures
everything is setup, and does so a little faster.
Switched to using pre_delete instead of post_delete to record activity
stream delete operations so we have access to all of the fields that may
be associated with the field (eg things that may be being deleted with
this object through a cascade delete).
Switched to recording the full dict of the object instead of a diff
(since the diff will always be empty).