Skip to content

Commit 9d1549f

Browse files
committed
feat: add application resource API with pagination and filtering
1 parent 97269d5 commit 9d1549f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/common/constants/permission_constants.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class Group(Enum):
5252
MODEL = "MODEL"
5353
SYSTEM_MODEL = "SYSTEM_MODEL"
5454
SYSTEM_RES_MODEL = "SYSTEM_RESOURCE_MODEL"
55+
SYSTEM_RES_APPLICATION = "SYSTEM_RESOURCE_APPLICATION"
5556

5657
TOOL = "TOOL"
5758
SYSTEM_TOOL = "SYSTEM_TOOL"
@@ -360,6 +361,7 @@ def get_workspace_role(self):
360361
Group.KNOWLEDGE_WORKSPACE_USER_RESOURCE_PERMISSION.value: _("Knowledge"),
361362
Group.MODEL_WORKSPACE_USER_RESOURCE_PERMISSION.value: _("Model"),
362363
Group.TOOL_WORKSPACE_USER_RESOURCE_PERMISSION.value: _("Tool"),
364+
Group.SYSTEM_RES_APPLICATION.value: _("Application"),
363365
}
364366

365367

@@ -1190,6 +1192,10 @@ class PermissionConstants(Enum):
11901192
group=Group.SYSTEM_RES_MODEL, operate=Operate.READ, role_list=[RoleConstants.ADMIN],
11911193
parent_group=[SystemGroup.RESOURCE_MODEL]
11921194
)
1195+
RESOURCE_APPLICATION_READ = Permission(
1196+
group=Group.SYSTEM_RES_APPLICATION, operate=Operate.READ, role_list=[RoleConstants.ADMIN],
1197+
parent_group=[SystemGroup.RESOURCE_APPLICATION]
1198+
)
11931199
RESOURCE_TOOL_READ = Permission(
11941200
group=Group.SYSTEM_RES_TOOL, operate=Operate.READ, role_list=[RoleConstants.ADMIN],
11951201
parent_group=[SystemGroup.RESOURCE_TOOL]

0 commit comments

Comments
 (0)