CFtpServer::EnableClientAccess Method  
 
BOOL EnableClientAccess(
  UINT nClientId,  
  DWORD dwUserAccess,  
  BOOL bEnable  
);

Enable or disable access rights for the specified client session.

Parameters

nClientId
An unsigned integer which uniquely identifies the client session.
dwUserAccess
An unsigned integer which specifies an access right to enable or disable. For a list of user access rights that can be granted to the client, see User Access Constants.
bEnable
An integer value which specifies if permission should be granted or revoked for the specified access right. If this value is non-zero, permission is granted to the client to perform the action specified by the dwUserAccess parameter. If this value is zero, that permission is revoked.

Return Value

If the method succeeds, the return value is non-zero. If the client ID does not specify a valid client session, the method will return zero. This method can only be used with authenticated clients. If the client session has not been authenticated, the return value will be zero.

Remarks

The EnableClientAccess method is used to enable or disable access to specific functionality by the client. The method can only change a single access right and cannot be used to enable or disable multiple access rights in a single method call. To change multiple user access rights for the client, use the SetClientAccess method.

This method cannot be used to change the access rights for a restricted or anonymous user. Those rights are granted when the client session is authenticated and will persist until the client disconnects from the server. This restriction is designed to prevent the inadvertent granting of rights to an untrusted client that could compromise the security of the server.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csftsv10.lib

See Also

AuthenticateClient, GetClientAccess, SetClientAccess