TDengine/source/dnode/mnode/impl/inc/mndPrivilege.h

45 lines
1.9 KiB
C
Raw Normal View History

2021-09-22 08:15:20 +00:00
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2022-06-25 01:09:33 +00:00
#ifndef _TD_MND_PRIVILEGE_H
#define _TD_MND_PRIVILEGE_H
2021-10-04 09:44:39 +00:00
2021-11-27 14:56:18 +00:00
#include "mndInt.h"
2021-10-04 09:44:39 +00:00
2021-10-16 07:16:05 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2021-10-04 09:44:39 +00:00
2022-06-25 01:09:33 +00:00
int32_t mndInitPrivilege(SMnode *pMnode);
void mndCleanupPrivilege(SMnode *pMnode);
2021-10-17 03:42:05 +00:00
2022-06-25 01:09:33 +00:00
int32_t mndCheckOperPrivilege(SMnode *pMnode, const char *user, EOperType operType);
int32_t mndCheckDbPrivilege(SMnode *pMnode, const char *user, EOperType operType, SDbObj *pDb);
2022-06-25 10:03:12 +00:00
int32_t mndCheckDbPrivilegeByName(SMnode *pMnode, const char *user, EOperType operType, const char *dbname);
2023-10-24 03:29:04 +00:00
int32_t mndCheckViewPrivilege(SMnode *pMnode, const char *user, EOperType operType, const char *pViewFName);
2022-12-01 04:22:43 +00:00
int32_t mndCheckTopicPrivilege(SMnode *pMnode, const char *user, EOperType operType, SMqTopicObj *pTopic);
2022-06-25 10:03:12 +00:00
int32_t mndCheckShowPrivilege(SMnode *pMnode, const char *user, EShowType showType, const char *dbname);
2022-06-25 01:09:33 +00:00
int32_t mndCheckAlterUserPrivilege(SUserObj *pOperUser, SUserObj *pUser, SAlterUserReq *pAlter);
2022-07-27 07:43:49 +00:00
int32_t mndSetUserAuthRsp(SMnode *pMnode, SUserObj *pUser, SGetUserAuthRsp *pRsp);
int32_t mndSetUserWhiteListRsp(SMnode* pMnode, SUserObj* pUser, SGetUserWhiteListRsp* pWhiteListRsp);
2023-09-11 13:02:50 +00:00
int32_t mndEnableIpWhiteList(SMnode *pMnode);
2023-09-12 01:54:13 +00:00
int32_t mndFetchIpWhiteList(SIpWhiteList *ipList, char **buf);
2022-02-15 09:24:34 +00:00
2021-10-16 07:16:05 +00:00
#ifdef __cplusplus
}
#endif
2021-10-04 09:44:39 +00:00
2022-06-25 01:09:33 +00:00
#endif /*_TD_MND_PRIVILEGE_H*/