mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #5066: Update view_reportresult to view_report permission
This commit is contained in:
@ -25,7 +25,7 @@ class Command(BaseCommand):
|
||||
for report in report_list:
|
||||
if module_name in options['reports'] or report.full_name in options['reports']:
|
||||
|
||||
# Run the report and create a new ReportResult
|
||||
# Run the report and create a new JobResult
|
||||
self.stdout.write(
|
||||
"[{:%H:%M:%S}] Running {}...".format(timezone.now(), report.full_name)
|
||||
)
|
||||
|
@ -315,7 +315,7 @@ class ReportListView(ContentTypePermissionRequiredMixin, View):
|
||||
Retrieve all of the available reports from disk and the recorded JobResult (if any) for each.
|
||||
"""
|
||||
def get_required_permission(self):
|
||||
return 'extras.view_reportresult'
|
||||
return 'extras.view_report'
|
||||
|
||||
def get(self, request):
|
||||
|
||||
@ -347,7 +347,7 @@ class ReportView(ContentTypePermissionRequiredMixin, View):
|
||||
Display a single Report and its associated JobResult (if any).
|
||||
"""
|
||||
def get_required_permission(self):
|
||||
return 'extras.view_reportresult'
|
||||
return 'extras.view_report'
|
||||
|
||||
def get(self, request, module, name):
|
||||
|
||||
@ -401,7 +401,7 @@ class ReportResultView(ContentTypePermissionRequiredMixin, View):
|
||||
Display a JobResult pertaining to the execution of a Report.
|
||||
"""
|
||||
def get_required_permission(self):
|
||||
return 'extras.view_reportresult'
|
||||
return 'extras.view_report'
|
||||
|
||||
def get(self, request, job_result_pk):
|
||||
report_content_type = ContentType.objects.get(app_label='extras', model='report')
|
||||
|
Reference in New Issue
Block a user