Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon API > Global administrators

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon API  /

Global administrators

[md-api, Emanuele Aliberti via]
Emanuele Aliber…
Emanuele Aliberti via md-api - 09:03am, Aug 12 2021
Guest User

How do I determine whether a user is a global administrator?

There are quite some ways to determine if a user is a domain administrator:

  1. MD_GetIsAdmin(MD_HANDLE hUser); macro → bool MD_GetWebConfigBit(hUser, MDUSERDLL_ISADMIN);
  2. MD_GetUserInfo(MD_HANDLE hUser, MD_UserInfo* userInfo);bool userInfo.IsDomainAdmin;
  3. bool isDomainAdmin = MD_GetIsDomainAdmin(MD_HANDLE hUser, const char* DomainName);

But I can't find a bool MD_GetIsGlobalAdmin(MD_HANDLE hUser).

Instead, should I iterate on MD_GetDomainNames() and call MD_GetIsDomainAdmin() for each one and AND the results?



--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------

  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Viengkham Liev - Aug 13, 2021 8:27 am (#1 Total: 2)  

Guest User  

Photo of Author
Posts: 1
In MD-API.html look at MD_GetIsAdmin.  It is mentioned below bool MD_GetWebConfigBit(  MD_HANDLE hUser, int Bit).
Try using MD_GetIsAdmin() to look for global admin.  And use  MD_GetIsDomainAdmin() for domain admin.
 
bool IsGlobalAdmin = MD_GetIsAdmin(hUser);
 
 
 
 
--
Viengkham Liev
Senior Software Developer
o: 817-601-3222    e: Viengkham.Liev@mdaemon.com

MDaemon Technologies
Simple Secure Email

Visit us on www.mdaemon.com | Facebook | LinkedIn | YouTube
Sent using the MDaemon Email Server
 
From: "Emanuele Aliberti via md-api" <md-api@mdaemon.com>
To: "md-api List Member" <md-api@mdaemon.com>
Date: Thu, 12 Aug 2021 16:03:23 +0200
Subject: [md-api] Global administrators
 
How do I determine whether a user is a global administrator?
There are quite some ways to determine if a user is a domain administrator:
  1. MD_GetIsAdmin(MD_HANDLE hUser); macro → bool MD_GetWebConfigBit(hUser, MDUSERDLL_ISADMIN);
  2. MD_GetUserInfo(MD_HANDLE hUser, MD_UserInfo* userInfo);bool userInfo.IsDomainAdmin;
  3. bool isDomainAdmin = MD_GetIsDomainAdmin(MD_HANDLE hUser, const char* DomainName);
But I can't find a bool MD_GetIsGlobalAdmin(MD_HANDLE hUser).
Instead, should I iterate on MD_GetDomainNames() and call MD_GetIsDomainAdmin() for each one and AND the results?
 
--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------

--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion.  MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------

Emanuele Aliberti via md-api - Aug 13, 2021 8:55 am (#2 Total: 2)  

Guest User  

Photo of Author
Posts: 1
On 13/08/2021 15:27, Viengkham Liev wrote:
> bool IsGlobalAdmin = MD_GetIsAdmin(hUser);


Thanks, Viengkham! That's exactly what I needed.

Emanuele


--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion. MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------





  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.