mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-12 04:39:02 +00:00
feat: Add periodic display and validate job params
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from common.api.generic import JMSBulkModelViewSet
|
||||
from common.utils.http import is_true
|
||||
@@ -28,7 +29,7 @@ class AdHocViewSet(JMSBulkModelViewSet):
|
||||
def check_object_permissions(self, request, obj):
|
||||
if request.method != 'GET' and obj.creator != request.user:
|
||||
self.permission_denied(
|
||||
request, message={"detail": "Deleting other people's script is not allowed"}
|
||||
request, message={"detail": _("Deleting other people's script is not allowed")}
|
||||
)
|
||||
return super().check_object_permissions(request, obj)
|
||||
|
||||
|
Reference in New Issue
Block a user