mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-11 19:12:35 +00:00
* perf: 修复一些错误权限位 * Pr@fix rbac@fix rbac permissions (#7648) * fix: 确保每次 migrate 执行更新 role permissions * perf: 修改 choices * feat: 兼容apple m1 * perf: 修改 migrations role permissions * perf: pymysql 导入 * perf: admin 判断 * fix: 修复消息订阅权限 Co-authored-by: ibuler <ibuler@qq.com> Co-authored-by: Aaron3S <chenyang@fit2cloud.com> Co-authored-by: feng626 <1304903146@qq.com>
26 lines
687 B
Python
26 lines
687 B
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
from django.views.generic import TemplateView
|
|
from django.conf import settings
|
|
|
|
from common.mixins.views import PermissionsMixin
|
|
from rbac.permissions import RBACPermission
|
|
|
|
__all__ = ['CeleryTaskLogView']
|
|
|
|
|
|
class CeleryTaskLogView(PermissionsMixin, TemplateView):
|
|
template_name = 'ops/celery_task_log.html'
|
|
permission_classes = [RBACPermission]
|
|
rbac_perms = {
|
|
'GET': 'ops.view_tasklog'
|
|
}
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super().get_context_data(**kwargs)
|
|
context.update({
|
|
'task_id': self.kwargs.get('pk'),
|
|
'ws_port': settings.WS_LISTEN_PORT
|
|
})
|
|
return context
|