3.1.1.1.41.2.2 GetPolicyForUserSid
The GetPolicyForUserSid procedure is used to retrieve a specific UserAccessPolicy for the specified User SID.
The following input parameter is used.
Param_userSid: This is of type string that specifies the User SID for which the policy needs to be retrieved.
The following is the output parameter from this procedure.
Result_accessPolicy: Of type UserAccessPolicy.
The server performs the following processing steps:
Convert the given Param_userSid from string format to byte array format by System.Security.Prinicipal.SecurityIdentifier(Param_userSid).GetBinaryForm() method.
Look up the row in ADM_UserAccessPolicyTable with the UserGroupSecurityIdentifierBytes value being Param_userSid.
If row is not found, then return NULL. Otherwise initialize Result_accessPolicy with UserAccessPolicy.
Assign Result_accessPolicy.PolicyId with PolicyId of the row.
Copy the UserAccessPolicyDetails into Result_accessPolicy.
Call GetPolicyMapEntriesForPolicyId procedure of ADM_PolicyMapTable with PolicyId assigned to Param_policyId as the parameter. Assign the Result_policyEntries to Result_accessPolicy.PolicyDefinition.
Return Result_accessPolicy as the output of the procedure.