Skip to content

Commit

Permalink
optimization: iam 业务运维权限添加公共流程相关 action
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed Dec 14, 2022
1 parent 2b8e68b commit 26c4b56
Show file tree
Hide file tree
Showing 2 changed files with 202 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bksops_iam_migrations/migrations/0015_bk_sops_202212122120.py
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)]
184 changes: 184 additions & 0 deletions support-files/iam/15_update_biz_operator_actions.json
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"
}
]
}
]
}
]
}

0 comments on commit 26c4b56

Please sign in to comment.