mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-12 12:57:41 +02:00
Fix schedule organization scan
This commit is contained in:
@@ -51,7 +51,7 @@ urlpatterns = [
|
||||
views.schedule_scan,
|
||||
name='schedule_scan'),
|
||||
path(
|
||||
'schedule/organization/<int:id>',
|
||||
'<slug:slug>/schedule/organization/<int:id>',
|
||||
views.schedule_organization_scan,
|
||||
name='schedule_organization_scan'),
|
||||
path(
|
||||
|
||||
@@ -724,7 +724,7 @@ def start_organization_scan(request, id, slug):
|
||||
|
||||
|
||||
@has_permission_decorator(PERM_INITATE_SCANS_SUBSCANS, redirect_url=FOUR_OH_FOUR_URL)
|
||||
def schedule_organization_scan(request, id):
|
||||
def schedule_organization_scan(request, slug, id):
|
||||
organization =Organization.objects.get(id=id)
|
||||
if request.method == "POST":
|
||||
engine_type = int(request.POST['scan_mode'])
|
||||
@@ -796,7 +796,7 @@ def schedule_organization_scan(request, id):
|
||||
messages.INFO,
|
||||
f'Scan started for {ndomains} domains in organization {organization.name}'
|
||||
)
|
||||
return HttpResponseRedirect(reverse('scheduled_scan_view'))
|
||||
return HttpResponseRedirect(reverse('scheduled_scan_view', kwargs={'slug': slug, 'id': id}))
|
||||
|
||||
# GET request
|
||||
engine = EngineType.objects
|
||||
|
||||
@@ -65,7 +65,7 @@ Organizations
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user|can:'initiate_scans_subscans' %}
|
||||
<a href="{% url 'schedule_organization_scan' organization.id %}" class="open-domain" data-toggle="tooltip" data-placement="top" title="Schedule Scan">
|
||||
<a href="{% url 'schedule_organization_scan' current_project.slug organization.id %}" class="open-domain" data-toggle="tooltip" data-placement="top" title="Schedule Scan">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-watch table-schedule"><circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user