Merge pull request #11488 from taosdata/fix/ZhiqiangWang/TD-13254-fix-show-grants
fix(grant): show grants.
This commit is contained in:
commit
3ca453940e
|
@ -14,12 +14,13 @@
|
|||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#ifndef _GRANT
|
||||
#include "os.h"
|
||||
#include "taoserror.h"
|
||||
#include "mndGrant.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
#ifndef _GRANT
|
||||
|
||||
int32_t mndInitGrant(SMnode *pMnode) { return TSDB_CODE_SUCCESS; }
|
||||
void mndCleanupGrant() {}
|
||||
void grantParseParameter() { mError("can't parsed parameter k"); }
|
||||
|
@ -30,4 +31,4 @@ void grantRestore(EGrantType grant, uint64_t value) {}
|
|||
|
||||
#endif
|
||||
|
||||
void parseGrantParameter() { parseGrantParameter(); }
|
||||
void parseGrantParameter() { grantParseParameter(); }
|
|
@ -652,24 +652,26 @@ static int32_t mndRetrieveUsers(SNodeMsg *pReq, SShowObj *pShow, SSDataBlock* pB
|
|||
if (pShow->pIter == NULL) break;
|
||||
|
||||
cols = 0;
|
||||
|
||||
SColumnInfoData* pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||
SColumnInfoData* pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
|
||||
|
||||
char name[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0};
|
||||
STR_WITH_MAXSIZE_TO_VARSTR(name, pUser->user, pShow->bytes[cols]);
|
||||
|
||||
colDataAppend(pColInfo, numOfRows, (const char*) name, false);
|
||||
|
||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||
cols++;
|
||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
|
||||
|
||||
const char* src = pUser->superUser? "super":"normal";
|
||||
char b[10+VARSTR_HEADER_SIZE] = {0};
|
||||
STR_WITH_SIZE_TO_VARSTR(b, src, strlen(src));
|
||||
colDataAppend(pColInfo, numOfRows, (const char*) b, false);
|
||||
|
||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||
cols++;
|
||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
|
||||
colDataAppend(pColInfo, numOfRows, (const char*) &pUser->createdTime, false);
|
||||
|
||||
cols++;
|
||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols);
|
||||
STR_WITH_MAXSIZE_TO_VARSTR(name, pUser->acct, pShow->bytes[cols]);
|
||||
colDataAppend(pColInfo, numOfRows, (const char*) name, false);
|
||||
|
|
Loading…
Reference in New Issue