-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimization: iam 业务运维权限添加公共流程相关 action
- Loading branch information
1 parent
2b8e68b
commit 26c4b56
Showing
2 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
bksops_iam_migrations/migrations/0015_bk_sops_202212122120.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from django.db import migrations | ||
|
||
from iam.contrib.iam_migration.migrator import IAMMigrator | ||
|
||
|
||
def forward_func(apps, schema_editor): | ||
migrator = IAMMigrator(Migration.migration_json) | ||
migrator.migrate() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
migration_json = "15_update_biz_operator_actions.json" | ||
|
||
dependencies = [("bksops_iam_migrations", "0014_bk_sops_202209211105")] | ||
|
||
operations = [migrations.RunPython(forward_func)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
{ | ||
"system_id": "bk_sops", | ||
"operations": [ | ||
{ | ||
"operation": "upsert_common_actions", | ||
"data": [ | ||
{ | ||
"name": "使用流程创建任务", | ||
"name_en": "Create task by flow", | ||
"actions": [ | ||
{ | ||
"id": "project_view" | ||
}, | ||
{ | ||
"id": "flow_view" | ||
}, | ||
{ | ||
"id": "flow_create_task" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "使用轻应用", | ||
"name_en": "Use mini app", | ||
"actions": [ | ||
{ | ||
"id": "project_view" | ||
}, | ||
{ | ||
"id": "flow_view" | ||
}, | ||
{ | ||
"id": "mini_app_view" | ||
}, | ||
{ | ||
"id": "mini_app_create_task" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "使用公共流程创建任务", | ||
"name_en": "Create task by common flow", | ||
"actions": [ | ||
{ | ||
"id": "project_view" | ||
}, | ||
{ | ||
"id": "common_flow_view" | ||
}, | ||
{ | ||
"id": "common_flow_create_task" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "业务运维", | ||
"name_en": "Operator", | ||
"actions": [ | ||
{ | ||
"id": "project_view" | ||
}, | ||
{ | ||
"id": "project_edit" | ||
}, | ||
{ | ||
"id": "flow_create" | ||
}, | ||
{ | ||
"id": "flow_view" | ||
}, | ||
{ | ||
"id": "flow_edit" | ||
}, | ||
{ | ||
"id": "flow_delete" | ||
}, | ||
{ | ||
"id": "flow_create_task" | ||
}, | ||
{ | ||
"id": "flow_create_mini_app" | ||
}, | ||
{ | ||
"id": "flow_create_periodic_task" | ||
}, | ||
{ | ||
"id": "flow_create_clocked_task" | ||
}, | ||
{ | ||
"id": "common_flow_view" | ||
}, | ||
{ | ||
"id": "common_flow_create_task" | ||
}, | ||
{ | ||
"id": "task_view" | ||
}, | ||
{ | ||
"id": "task_edit" | ||
}, | ||
{ | ||
"id": "task_operate" | ||
}, | ||
{ | ||
"id": "task_delete" | ||
}, | ||
{ | ||
"id": "task_clone" | ||
}, | ||
{ | ||
"id": "mini_app_edit" | ||
}, | ||
{ | ||
"id": "mini_app_view" | ||
}, | ||
{ | ||
"id": "mini_app_delete" | ||
}, | ||
{ | ||
"id": "mini_app_create_task" | ||
}, | ||
{ | ||
"id": "periodic_task_view" | ||
}, | ||
{ | ||
"id": "periodic_task_edit" | ||
}, | ||
{ | ||
"id": "periodic_task_delete" | ||
}, | ||
{ | ||
"id": "clocked_task_view" | ||
}, | ||
{ | ||
"id": "clocked_task_edit" | ||
}, | ||
{ | ||
"id": "clocked_task_delete" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "管理员权限", | ||
"name_en": "Admin Permission", | ||
"actions": [ | ||
{ | ||
"id": "admin_view" | ||
}, | ||
{ | ||
"id": "admin_edit" | ||
}, | ||
{ | ||
"id": "audit_view" | ||
}, | ||
{ | ||
"id": "statistics_view" | ||
}, | ||
{ | ||
"id": "project_create" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "业务只读", | ||
"name_en": "Only Read", | ||
"actions": [ | ||
{ | ||
"id": "project_view" | ||
}, | ||
{ | ||
"id": "flow_view" | ||
}, | ||
{ | ||
"id": "task_view" | ||
}, | ||
{ | ||
"id": "mini_app_view" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |