Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: format list privilege group result #2372

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

shaoting-huang
Copy link
Contributor

@shaoting-huang shaoting-huang commented Nov 23, 2024

@XuanYang-cn
Copy link
Contributor

issue: milvus-io/milvus#37031

>>> role.list_privilege_groups()
PrivilegeGroupInfo groups:
- PrivilegeGroupItem: <privilege_group:privilege_group>, <privileges:('Insert', 'Release')>
- PrivilegeGroupItem: <privilege_group:ClusterReadWrite>, <privileges:('ListDatabases', 'SelectOwnership', 'SelectUser', 'DescribeResourceGroup', 'ListResourceGroups', 'FlushAll', 'TransferNode', 'TransferReplica', 'UpdateResourceGroups')>
- PrivilegeGroupItem: <privilege_group:ClusterAdmin>, <privileges:('ListDatabases', 'SelectOwnership', 'SelectUser', 'DescribeResourceGroup', 'ListResourceGroups', 'FlushAll', 'TransferNode', 'TransferReplica', 'UpdateResourceGroups', 'BackupRBAC', 'RestoreRBAC', 'CreateDatabase', 'DropDatabase', 'CreateOwnership', 'DropOwnership', 'ManageOwnership', 'CreateResourceGroup', 'DropResourceGroup', 'UpdateUser')>
- PrivilegeGroupItem: <privilege_group:CollectionReadOnly>, <privileges:('Query', 'Search', 'IndexDetail', 'GetFlushState', 'GetLoadState', 'GetLoadingProgress', 'HasPartition', 'ShowPartitions', 'DescribeCollection', 'DescribeAlias', 'GetStatistics', 'ListAliases')>
- PrivilegeGroupItem: <privilege_group:CollectionAdmin>, <privileges:('Query', 'Search', 'IndexDetail', 'GetFlushState', 'GetLoadState', 'GetLoadingProgress', 'HasPartition', 'ShowPartitions', 'DescribeCollection', 'DescribeAlias', 'GetStatistics', 'ListAliases', 'Load', 'Release', 'Insert', 'Delete', 'Upsert', 'Import', 'Flush', 'Compaction', 'LoadBalance', 'RenameCollection', 'CreateIndex', 'DropIndex', 'CreatePartition', 'DropPartition', 'CreateAlias', 'DropAlias')>
- PrivilegeGroupItem: <privilege_group:ClusterReadOnly>, <privileges:('ListDatabases', 'SelectOwnership', 'SelectUser', 'DescribeResourceGroup', 'ListResourceGroups')>
- PrivilegeGroupItem: <privilege_group:DatabaseAdmin>, <privileges:('ShowCollections', 'DescribeDatabase', 'AlterDatabase', 'CreateCollection', 'DropCollection')>
- PrivilegeGroupItem: <privilege_group:CollectionReadWrite>, <privileges:('Query', 'Search', 'IndexDetail', 'GetFlushState', 'GetLoadState', 'GetLoadingProgress', 'HasPartition', 'ShowPartitions', 'DescribeCollection', 'DescribeAlias', 'GetStatistics', 'ListAliases', 'Load', 'Release', 'Insert', 'Delete', 'Upsert', 'Import', 'Flush', 'Compaction', 'LoadBalance', 'RenameCollection', 'CreateIndex', 'DropIndex', 'CreatePartition', 'DropPartition')>
- PrivilegeGroupItem: <privilege_group:DatabaseReadOnly>, <privileges:('ShowCollections', 'DescribeDatabase')>
- PrivilegeGroupItem: <privilege_group:DatabaseReadWrite>, <privileges:('ShowCollections', 'DescribeDatabase', 'AlterDatabase')>

@shaoting-huang Please move the codes outside of the description. The description are used as git commit messages, this code is too long for a git commit messages

@shaoting-huang
Copy link
Contributor Author

shaoting-huang commented Nov 26, 2024

the format should be

>>> role.list_privilege_groups()
PrivilegeGroupInfo groups:
- PrivilegeGroupItem: <privilege_group:privilege_group>, <privileges:('Insert', 'Release')>
- PrivilegeGroupItem: <privilege_group:ClusterReadWrite>, <privileges:('ListDatabases', 'SelectOwnership', 'SelectUser', 'DescribeResourceGroup', 'ListResourceGroups', 'FlushAll', 'TransferNode', 'TransferReplica', 'UpdateResourceGroups')>
- PrivilegeGroupItem: <privilege_group:ClusterAdmin>, <privileges:('ListDatabases', 'SelectOwnership', 'SelectUser', 'DescribeResourceGroup', 'ListResourceGroups', 'FlushAll', 'TransferNode', 'TransferReplica', 'UpdateResourceGroups', 'BackupRBAC', 'RestoreRBAC', 'CreateDatabase', 'DropDatabase', 'CreateOwnership', 'DropOwnership', 'ManageOwnership', 'CreateResourceGroup', 'DropResourceGroup', 'UpdateUser')>
- PrivilegeGroupItem: <privilege_group:CollectionReadOnly>, <privileges:('Query', 'Search', 'IndexDetail', 'GetFlushState', 'GetLoadState', 'GetLoadingProgress', 'HasPartition', 'ShowPartitions', 'DescribeCollection', 'DescribeAlias', 'GetStatistics', 'ListAliases')>
- PrivilegeGroupItem: <privilege_group:CollectionAdmin>, <privileges:('Query', 'Search', 'IndexDetail', 'GetFlushState', 'GetLoadState', 'GetLoadingProgress', 'HasPartition', 'ShowPartitions', 'DescribeCollection', 'DescribeAlias', 'GetStatistics', 'ListAliases', 'Load', 'Release', 'Insert', 'Delete', 'Upsert', 'Import', 'Flush', 'Compaction', 'LoadBalance', 'RenameCollection', 'CreateIndex', 'DropIndex', 'CreatePartition', 'DropPartition', 'CreateAlias', 'DropAlias')>
- PrivilegeGroupItem: <privilege_group:ClusterReadOnly>, <privileges:('ListDatabases', 'SelectOwnership', 'SelectUser', 'DescribeResourceGroup', 'ListResourceGroups')>
- PrivilegeGroupItem: <privilege_group:DatabaseAdmin>, <privileges:('ShowCollections', 'DescribeDatabase', 'AlterDatabase', 'CreateCollection', 'DropCollection')>
- PrivilegeGroupItem: <privilege_group:CollectionReadWrite>, <privileges:('Query', 'Search', 'IndexDetail', 'GetFlushState', 'GetLoadState', 'GetLoadingProgress', 'HasPartition', 'ShowPartitions', 'DescribeCollection', 'DescribeAlias', 'GetStatistics', 'ListAliases', 'Load', 'Release', 'Insert', 'Delete', 'Upsert', 'Import', 'Flush', 'Compaction', 'LoadBalance', 'RenameCollection', 'CreateIndex', 'DropIndex', 'CreatePartition', 'DropPartition')>
- PrivilegeGroupItem: <privilege_group:DatabaseReadOnly>, <privileges:('ShowCollections', 'DescribeDatabase')>
- PrivilegeGroupItem: <privilege_group:DatabaseReadWrite>, <privileges:('ShowCollections', 'DescribeDatabase', 'AlterDatabase')>

@XuanYang-cn
Copy link
Contributor

/lgtm
/approve

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shaoting-huang, XuanYang-cn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot merged commit a086a9d into milvus-io:master Nov 26, 2024
11 checks passed
shaoting-huang added a commit to shaoting-huang/pymilvus that referenced this pull request Nov 26, 2024
sre-ci-robot pushed a commit that referenced this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants