Share via


CReplicationProject.CheckAccess Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Retrieves the Commerce Server Staging (CSS) user rights that have been assigned to the current user on a project.

object CheckAccess()

Return Value

A numeric value that indicates the CSS user rights that are assigned to the current user. The integer value corresponds to one of the two rights listed in the following table.

Name

Value

Description

CSS_ADMIN_ACCESS

983103

The user has CSS administrator rights.

CSS_USER_ACCESS

131097

The user has CSS operator rights.

Remarks

You must have CSS administrator or operator rights to execute this method.

The CReplicationProject.CheckAccess method corresponds to the COM method named ReplicationProject.CheckAccess.

Example

The following example retrieves the CSS user rights on Project1 for the user who is currently logged on.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");
  CReplicationProject replicationProject;
  replicationProject = (CReplicationProject)replicationServer.OpenProject("Project1", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);
    int perms = (int)replicationProject.CheckAccess();
    if (perms == 0xF003F)
    Console.WriteLine("You have CSS administrator rights on Project1");
    else if (perms == 0x20019)
    Console.WriteLine("You have CSS operator rights on Project1");

See Also

Other Resources

Projects

Configuring Security for Commerce Server Staging

CReplicationProject.GrantAccess Method

CReplicationProject.RemoveAccess Method

CReplicationProject Class