mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: add list aliases privilege into public role (#38176)
related issue: https://github.com/milvus-io/milvus/issues/37031 Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
This commit is contained in:
parent
db2ed2c044
commit
d822edb9a8
@ -590,6 +590,7 @@ func (c *Core) initPublicRolePrivilege() error {
|
||||
// grant privileges for the public role
|
||||
globalPrivileges := []string{
|
||||
commonpb.ObjectPrivilege_PrivilegeDescribeCollection.String(),
|
||||
commonpb.ObjectPrivilege_PrivilegeListAliases.String(),
|
||||
}
|
||||
collectionPrivileges := []string{
|
||||
commonpb.ObjectPrivilege_PrivilegeIndexDetail.String(),
|
||||
|
||||
@ -1977,7 +1977,7 @@ func TestCore_InitRBAC(t *testing.T) {
|
||||
meta := mockrootcoord.NewIMetaTable(t)
|
||||
c := newTestCore(withHealthyCode(), withMeta(meta))
|
||||
meta.EXPECT().CreateRole(mock.Anything, mock.Anything, mock.Anything).Return(nil).Twice()
|
||||
meta.EXPECT().OperatePrivilege(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil).Twice()
|
||||
meta.EXPECT().OperatePrivilege(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil).Times(3)
|
||||
|
||||
Params.Save(Params.RoleCfg.Enabled.Key, "false")
|
||||
Params.Save(Params.ProxyCfg.EnablePublicPrivilege.Key, "true")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user