Setting Folder Permissions (SetPermission)

Use the ICISite interface SetPermission method to add folder permissions or to change existing permissions.

Signature:

HRESULT SetPermission (

[in]IPermission *pPermission,

[in, optional] VARIANT_BOOL bRemoveOtherPermissions);

Optional Parameter

If you want to set permissions on a folder for a user and remove all other permissions, pass TRUE to the second parameter of setPermission(). This will REMOVE all other permissions from a folder (that is, break the inheritance).

   For example,

    set perm = Site.GetBlankPermission( "/usr/foo", "foo" )

    perm.FileDelete = True

    perm.FileUpload = True

    perm.FileDownload = False

    Site.SetPermission( perm, True )