SearchAuthnQueryFilter Class Methods
In this section, the SearchAuthnQueryFilter class methods are presented in alphabetical order.
Syntax
evaluateAttrValues(SBO_name, attr, user_ID)
Description
Use this method to return a list of values for a security attribute for a search user.
Note: This is an abstract method.
Parameters
Parameter  | 
Description  | 
|---|---|
SBO_name  | 
 Specifies a string representing a searchable object upon which the security attribute value needs to be evaluated  | 
attr  | 
 Specifies a string representing the security attribute value as a document-level filtering attribute.  | 
user_ID  | 
 Specifies user ID that executed the search query as a string.  | 
Returns
An array of string.
Example
import PTSF_SECURITY:*;
class UserPermission implements PTSF_SECURITY:SearchAuthnQueryFilter
   method UserPermissionList();
   method evaluateAttrValues(&sboName As string, &secAttr As string, &searchUser As string) Returns array of string;
end-class;
method UserPermissionList
end-method;
method evaluateAttrValues
   /+ &sboName as String, +/
   /+ &secAttr as String, +/
   /+ &searchUser as String +/
   /+ Returns Array of String +/
   /+ Extends/implements PTSF_SECURITY:SearchAuthnQueryFilter.evaluateAttrValues +/
   Local SQL &userPermissions_SQL;
   Local array of string &retvalues;
   Local string &isAdmin;
   &retvalues = CreateArrayRept("", 0);
   SQLExec("SELECT 'X' FROM PSROLEUSER WHERE ROLEUSER=:1 AND (ROLENAME=:2 OR ROLENAME=:3)", &searchUser, "Portal Administrator", "PeopleSoft Administrator", &isAdmin);
   If All(&isAdmin) Then
      &retvalues = CreateArray("R:Admin");
   Else
      &retvalues.Push("0"); /* Public */
      &retvalues.Push("1:" | &searchUser); /* Author */
      &userPermissions_SQL = CreateSQL("SELECT DISTINCT A.CLASSID FROM PSROLECLASS A, PSROLEUSER B, PSOPRDEFN C WHERE A.ROLENAME = B.ROLENAME AND C.OPRID = B.ROLEUSER AND C.OPRID = :1", &searchUser);
      Local string &classids;
      While &userPermissions_SQL.Fetch(&classids)
         &retvalues.Push(&classids);
      End-While;
   End-If;
   Return &retvalues;
end-method;