enh: allow any user to create a topic

This commit is contained in:
Shengliang Guan 2022-12-06 12:48:11 +08:00
parent 2e900918bb
commit 8985f5513c
1 changed files with 2 additions and 2 deletions

View File

@ -580,7 +580,7 @@ static int32_t mndProcessCreateTopicReq(SRpcMsg *pReq) {
goto _OVER; goto _OVER;
} }
if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_TOPIC) != 0) { if (mndCheckTopicPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_TOPIC, NULL) != 0) {
goto _OVER; goto _OVER;
} }
@ -704,7 +704,7 @@ static int32_t mndProcessDropTopicReq(SRpcMsg *pReq) {
} }
#endif #endif
if (mndCheckDbPrivilegeByName(pMnode, pReq->info.conn.user, MND_OPER_READ_DB, pTopic->db) != 0) { if (mndCheckTopicPrivilege(pMnode, pReq->info.conn.user, MND_OPER_DROP_TOPIC, pTopic) != 0) {
return -1; return -1;
} }