This topic has not yet been rated - Rate this topic

Security.CheckUserGlobalPermission Method (WebSvcSecurity)

Office 2007
Checks whether the current user has a single specified global permission.

Namespace: [Security Web service]
Web reference: http://ServerName/ProjectServerName/_vti_bin/psi/Security.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/Security/CheckUserGlobalPermission", RequestNamespace="http://schemas.microsoft.com/office/project/server/webservices/Security/", ResponseNamespace="http://schemas.microsoft.com/office/project/server/webservices/Security/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public bool CheckUserGlobalPermission (
	Guid globalPermissionUid
)

Parameters

globalPermissionUid

GUID for a global permission.

Return Value

true if the current user has the permission.

To check multiple global permissions, use CheckUserGlobalPermissions for better performance. To check a security permission for another resource requires using impersonation to log on as that resource.

For the globalPermissionUids parameter, use the PSSecurityCategoryPermission structure to get the GUID value of a default global permission, or use ReadGlobalPermissions to get the GUID for a custom global permission.

Project Server Permissions

Permission

Description

LogOn

Log on Project Server. Global permission.

The following example checks if the current user has the "About Project Server" permission. For additional information and a complete sample application that checks global permissions, see Using Security Methods in the PSI.

using System;
using System.Net;
using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
CookieContainer cookiecontainer = new CookieContainer();
SecurityWebSvc.Security security = new SecurityWebSvc.Security();
security.Url = "http://ServerName/ProjectServerName/_vti_bin/psi/security.asmx";
security.CookieContainer = cookiecontainer;
security.Credentials = System.Net.CredentialCache.DefaultCredentials;

//Check if the user has the "About Project Server" permission.
bool hasPermission = 
   security.CheckUserGlobalPermission(PSLibrary.PSSecurityGlobalPermission.AboutMicrosoftOfficeProjectServer);
. . .
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.