Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions apps/common/constants/permission_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,10 +1212,6 @@ class PermissionConstants(Enum):
group=Group.SYSTEM_RES_APPLICATION, operate=Operate.DEBUG, role_list=[RoleConstants.ADMIN],
parent_group=[SystemGroup.RESOURCE_APPLICATION]
)
RESOURCE_APPLICATION_IMPORT = Permission(
group=Group.SYSTEM_RES_APPLICATION, operate=Operate.IMPORT, role_list=[RoleConstants.ADMIN],
parent_group=[SystemGroup.RESOURCE_APPLICATION]
)
RESOURCE_APPLICATION_EXPORT = Permission(
group=Group.SYSTEM_RES_APPLICATION, operate=Operate.EXPORT, role_list=[RoleConstants.ADMIN],
parent_group=[SystemGroup.RESOURCE_APPLICATION]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an issue with the duplication of the GROUP field between "Import" and "Export" permissions in the same permission class. The current implementation includes both fields redundantly for each entry (e.g., group, operate, etc.). To fix this, only include unique groups once:

@@ -1213,6 +1212,6 @@ class PermissionConstants(Enum):
     SYS_APP_DEBUG = Permission(
         operate=Operate.DEBUG, role_list=[RoleAdmin],
         parent_group=[SystemGroup.RESOURCE_APPLICATION]
-    )

This will clean up redundancy while maintaining consistent data structures within your codebase.

Expand Down
Loading