|
PSAUTHITEM is one of PeopleSoft’s core security tables. It’s primary purpose is to track which pages and authorized actions that each permission list is assigned, but it tracks web library (iScript) permissions as well. In this article I’ll talk a little about the fields in PSAUTHITEM, how you can join to other PeopleTools tables to get more information (like Component), and how to decode the elusive AUTHORIZEDACTIONS field.
Here are the columns in PSAUTHITEM: CLASSID MENUNAME BARNAME BARITEMNAME PNLITEMNAME DISPLAYONLY AUTHORIZEDACTIONS ClassID is the permission list ID. Menuname, barname, baritemname and PNLITEMNAME are all keys on the PSMENUITEM table. You may remember back before version 8.4 where menus actually were used to navigate to a page. Well, even though we navigate to pages via the Portal Registry now, that old Menu structure is still used for page security. If you want to create a query that shows everything you need to set up on-line security including the component name, this query will show it to you. Component is the PNLGRPNAME field. select a.MENUNAME, b.PNLGRPNAME, a.PNLITEMNAME, a.BARNAME, a.BARITEMNAME, a.AUTHORIZEDACTIONS from PSAUTHITEM a, PSMENUITEM b where a.menuname = b.menuname and a.barname = b.barname and a.baritemname = b.itemname and a.classid = 'ALLPAGES' Okay, so you run the query. If you’re expecting AuthorizedActions to be some easy to use text field that spells out what the valid authorized actions are, you’re going to be disappointed because it’s just a numeric code. Think of AuthorizedActions as a 4-bit field with each bit representing an action. Here’s what the bit positions mean: Correction Update/DisplayAll Update/Display Add 1 1 1 1 = 2^3 + 2^2 + 2^1 + 2^0 = 8 + 4 + 2 + 1 = 15 So to grant a permission list full access to a page, this value will be equal to 15. Okay, it’s important to know that there are exceptions. If you run a query, you can find all sorts of scenarios where authorizedactions is greater than 15. I used to know why, but I’ve long since forgotten. If anybody can remind me I’d appreciate it! Anyway, to make AUTHORIZEDACTIONS return something a little more friendly, you’ll have to use bitwise operators to make it happen. Here’s a query written in Oracle 10G that splits AUTHORIZEDACTIONS into a series of Yes/No fields for Add, Update/Display, UpdateDisplay All, and Correction: select classid, menuname, barname, baritemname, pnlitemname, displayonly, case when bitand(authorizedactions,1) > 0 then 'Y' else 'N' END ADDACTION, case when bitand(authorizedactions,2) > 0 then 'Y' else 'N' END UPDATEACTION, case when bitand(authorizedactions,4) > 0 then 'Y' else 'N' END UPDATEALLACTION, case when bitand(authorizedactions,8) > 0 then 'Y' else 'N' END CORRECTIONACTION, case when authorizedactions > 15 then 'Y' else 'N' END SPECIAL from psauthitem where classid = 'ALLPAGES'
Comments () |
 |
|
|
|
|