Previous in Contents Next in Contents

CheckAccess Method

This method retrieves the currently logged-on user's access permissions on a Content Deployment project.

Syntax

ReplicationProject.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 retrieves the currently logged-on user's access permissions on Project1.

Option Explicit 
On Error Resume Next

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

dim ReplServer
set ReplServer = CreateObject("Crsapi.ReplicationServer")
ReplServer.Initialize("")
dim ReplProject
set ReplProject = ReplServer.OpenProject("Project1", OPEN_EXISTING_PROJECT)

dim Perms
Perms = ReplProject.CheckAccess

if Perms = CRS_ADMIN_ACCESS then
 Wscript.Echo "You have administrator privileges on Project1"
elseif Perms = CRS_USER_ACCESS
  Wscript.Echo "You have operator privileges on Project1"
else
  Wscript.Echo "You have no privileges on Project1"
end if

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

GrantAccess, RemoveAccess


© 1997-2000 Microsoft Corporation. All rights reserved.