Поделиться через


CReplicationServer.CheckAccess Method

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

object CheckAccess()

Return Value

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

Name

Value

Description

CSS_ADMINISTRATOR_ACCESS

983103

The user has CSS administrator access rights.

CSS_USER_ACCESS

131097

The user has CSS operator access rights.

Remarks

You must have CSS administrator or operator permissions to call this method.

The CReplicationServer.CheckAccess method corresponds to the COM method named ReplicationServer.CheckAccess.

Example

The following example displays the CSS access rights of the current user.

const int CSS_USER_ACCESS = 0x20019;
const int CSS_ADMINISTRATOR_ACCESS = 0xF003F;
CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
  int permission = (int)replicationServer.CheckAccess();
  if (permission == CSS_ADMINISTRATOR_ACCESS)
      Console.WriteLine("You have CSS administrator rights on the server");
  else if (permission == CSS_USER_ACCESS)
      Console.WriteLine("You have CSS operator rights on the server");
  else
      Console.WriteLine("You have no CSS user rights on the server");

See Also

Other Resources

How Are Permissions Granted to CSS Authentication Accounts?

CReplicationServer Class