mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 19:38:07 +00:00
[Feature] 添加功能 RemoteApp (#2706)
* [Feature] RemoteApp添加Model * [Feature] RemoteApp添加ViewSet API * [Feature] RemoteApp添加获取connection-info API * [Feature] Perms模块修改目录结构 * [Feature] RemoteAppPermission添加Model * [Feature] RemoteAppPermission添加ViewSet API * [Feature] RemoteAppPermission添加用户/用户组获取被授权的RemoteApp API * [Feature] RemoteAppPermission添加校验用户对RemoteApp的权限 API * [Feature] RemoteAppPermission添加获取用户授权的RemoteApp树 API * [Feature] RemoteAppPermission添加<添加/移除>所授权的<用户/RemoteApp> API * [Feature] RemoteApp添加创建、更新、详情、删除、用户RemoteApp等页面 * [Feature] RemoteAppPermission添加创建、更新、详情、删除、授权用户、授权RemoteApp等页面 * [Feature] RemoteApp从assets模块迁移到新添加的applications模块 * [Feature] RemoteApp/RemoteAppPermission添加迁移文件 * [Feature] RemoteApp/RemoteAppPermission修改小细节 * [Feature] RemoteApp/RemoteAppPermission修改小细节2 * [Feature] RemoteApp/RemoteAppPermission修改小细节3 * [Feature] RemoteApp更新迁移文件 * [Feature] RemoteApp/RemoteAppPermission添加翻译信息 * [Feature] RemoteApp/RemoteAppPermission删除迁移文件 * [Feature] RemoteApp/RemoteAppPermission添加迁移文件 * [Feature] RemoteApp/RemoteAppPermission修改代码风格
This commit is contained in:
36
apps/perms/serializers/remote_app_permission.py
Normal file
36
apps/perms/serializers/remote_app_permission.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# coding: utf-8
|
||||
#
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from ..models import RemoteAppPermission
|
||||
|
||||
|
||||
__all__ = [
|
||||
'RemoteAppPermissionSerializer',
|
||||
'RemoteAppPermissionUpdateUserSerializer',
|
||||
'RemoteAppPermissionUpdateRemoteAppSerializer',
|
||||
]
|
||||
|
||||
|
||||
class RemoteAppPermissionSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = RemoteAppPermission
|
||||
fields = [
|
||||
'id', 'name', 'users', 'user_groups', 'remote_apps', 'comment',
|
||||
'is_active', 'date_start', 'date_expired', 'is_valid',
|
||||
'created_by', 'date_created', 'org_id'
|
||||
]
|
||||
read_only_fields = ['created_by', 'date_created']
|
||||
|
||||
|
||||
class RemoteAppPermissionUpdateUserSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = RemoteAppPermission
|
||||
fields = ['id', 'users']
|
||||
|
||||
|
||||
class RemoteAppPermissionUpdateRemoteAppSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = RemoteAppPermission
|
||||
fields = ['id', 'remote_apps']
|
Reference in New Issue
Block a user