I_IrmPolicyInfo.HrGetRightsMask Method

Applies to: SharePoint Foundation 2010

Gets a rights mask that represents the rights that the user has to the requested file.

HRESULT HrGetRightsMask(
    DWORD* pdwRightsMask
    );

Parameters

pdwRightsMask

[out] A rights mask that represents the rights that the user has to the requested file. Possible values are:

Name

Description

Value

Comment

None

User has no rights to the requested file.

0x0000

SharePoint Foundation never assigns this right to a user who is downloading a file.

View

User can view the contents of the file.

0x0001

Edit

User can edit the contents of the file.

0x0002

Save

User can save a copy of the file.

0x0004

Extract

User can copy content out of the file.

0x0008

SharePoint Foundation assigns Edit, Save, and Extract together as one grouped right.

Print

User can print the file.

0x0010

Admin

User has full control of the file.

0x0040

All

0xFFFF

SharePoint Foundation never assigns this right to a user who is downloading a file.

Return Value

All I_IrmPolicyInfo Class methods return HRESULT values. A positive OK value indicates that the operation was successful. A negative return value indicates that the function did not succeed.

In general, if an I_IrmPolicyInfo Class method fails, the protector will not be able to recover from the error and will fail as well.

Remarks

This method enables the I_IrmProtector.HrProtect Method method of an autonomous Information Rights Management (IRM) protector to determine the rights that the user has to the requested file.

SharePoint Foundation determines the access privileges to grant a user based on the access control list (ACL) entry of that user. The rights mask that is passed to the HrGetRightsMask method is not a literal list of ACL permissions, but rather a mapping of ACL permissions to IRM rights. For more information, see Information Rights Management in SharePoint Foundation.

The I_IrmProtector.HrProtect Method method should not store the rights mask in the rights-managed file. Rather, it should construct an issuance license, or analogous construct for third-party rights management platforms, that lets an IRM-aware client application know what rights to enforce on the file. The rights that are granted should be associated with the user who is requesting the file.

For more information about integrated and autonomous protectors, see Custom IRM Protectors.

See Also

Reference

I_IrmProtector Interface

I_IrmPolicyInfo Class

Concepts

Information Rights Management in SharePoint Foundation

Custom IRM Protectors