I_IrmPolicyInfo.GetRequestingUser Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Gets the email address of the user requesting this file.

HRESULT HrGetRequestingUser(
    BSTR*  pbstrRequestingUser,
    BOOL*  pfRequestingUserIsSystem
    );

Parameters

pbstrRequestingUser

[out] The email address of the user requesting this file.

pfRequestingUserIsSystem

[out] True if Windows SharePoint Services itself is requesting the file. False if any other user is requesting the file.

Return Value

All I_IrmPolicyInfo Class methods return HRESULT values. A positive OK value indicates 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 email address of the user who is requesting the file.

The protector should associate the user email address with the rights granted to the user in the I_IrmPolicyInfo.HrGetRightsMask Method method. The protector can use the email address to help identify the requesting user. An IRM-aware client application can use the rights mask to authorize specific requests from the user.

The pfRequestingUserIsSytem argument specifies if Windows SharePoint Services itself is requesting the file, thereby enabling the protector to alter its behavior if that is the case. Since it is typical to automatically add Windows SharePoint Services as an owner of the document, this argument can be used to prevent a protector from adding Windows SharePoint Services twice.

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 Windows SharePoint Services Overview

Custom IRM Protectors