Previous in Contents Next in Contents

CheckAccess Method

This method retrieves the current user's access permissions on the Content Deployment server.

Syntax

ReplicationServer.CheckAccess

Remarks

You must have Site Server Publishing administrator privileges on the server to call this method.

The access permissions are as follows:

Name Value Description
CRS_ADMIN_ACCESS 983103 The user has Site Server Publishing administrator access privileges.
CRS_USER_ACCESS 131097 The user has Site Server Publishing operator access privileges.

Example

The following example checks and displays the access rights of the current user.

Option Explicit 
On Error Resume Next 

const CRS_USER_ACCESS   = 0&20019
const CRS_ADMIN_ACCESS  = 0&F003F

dim ReplServer
set ReplServer = CreateObject("Crsapi.ReplicationServer")
ReplServer.Initialize("")

dim Perms
Perms = ReplServer.CheckAccess 

if Perms = CRS_ADMIN_ACCESS then
 Wscript.Echo "You have administrator privileges on the server"
elseif Perms = CRS_USER_ACCESS
  Wscript.Echo "You have has user privileges on the server"
else
  Wscript.Echo "You have no privileges on the server"
end if

'Release Server object
set ReplServer = Nothing

© 1997-2000 Microsoft Corporation. All rights reserved.