Microsoft Dynamics GP version 10.0 introduces a new pessimistic task and role based security model. This model is defined in the following way:
- Access to all windows, tables, reports and miscellaneous permissions are classed as Security Operations.
- A set of Security Operations required to perform a specific task are assigned to a Security Task.
- Multiple Security Tasks required to perform a specific role are assigned to a Security Role.
- Each User and Company combination can then have multiple Security Roles assigned to it.
Note: Operations may be assigned to multiple Security Tasks and Security Tasks may be assigned to multiple Security Roles.
To obtain the data we will use a new Security Resource Descriptions table (Technical Name: syCurrentResources (SY09400) table) which was added to v10.0 to create a SQL Query to obtain the information. This table is initially empty, but can be populated by running the Clear Data File Maintenance process on it. The system will then rebuild the contents based on the current installed dictionaries.
Below are the steps to populate the Security Resource Descriptions table:
- Click Microsoft Dynamics GP, point to Maintenance, and then click Clear Data to open the Clear Data window.
- On the Display menu, click Physical.
- In the Series list, click System.
- In the Tables pane, click the Security Resource Descriptions table, and then click Insert.
- Click OK.
- Click Yes.
- In the Report Destination window, select the Screen check box, and then click OK to send the report to the screen.
- Close the report.
Now that the Security Resource Descriptions table has been populated we can use it in a SQL Query from SQL Query Analyzer (SQL Server 2000) or SQL Server Management (SQL Server 2005). The Query below will display the Security Roles and Security Tasks associated with a specific window or report as selected by changing the Display Name on the last line of the query.
SQL Query:
SELECT ISNULL(A.SECURITYROLEID,'') AS SECURITYROLEID, ISNULL(M.SECURITYROLENAME,'') AS SECURITYROLENAME, --ISNULL(M.SECURITYROLEDESC,'') AS SECURITYROLEDESC,
ISNULL(O.SECURITYTASKID,'') AS SECURITYTASKID, ISNULL(T.SECURITYTASKNAME,'') AS SECURITYTASKNAME, --ISNULL(T.SECURITYTASKDESC,'') AS SECURITYTASKDESC,
R.PRODNAME, R.TYPESTR, R.DSPLNAME, R.RESTECHNAME, R.DICTID, R.SECRESTYPE, R.SECURITYID
FROM DYNAMICS.dbo.SY09400 R
FULL JOIN DYNAMICS.dbo.SY10700 O ON R.DICTID = O.DICTID AND O.SECRESTYPE = R.SECRESTYPE AND O.SECURITYID = R.SECURITYID
FULL JOIN DYNAMICS.dbo.SY09000 T ON T.SECURITYTASKID = O.SECURITYTASKID
FULL JOIN DYNAMICS.dbo.SY10600 A ON A.SECURITYTASKID = T.SECURITYTASKID
FULL JOIN DYNAMICS.dbo.SY09100 M ON M.SECURITYROLEID = A.SECURITYROLEID
WHERE R.DSPLNAME = '<Display_Name>'
Note: The <Display_Name> placeholder represents the actual display name. For example, the display name may be "Sales Transaction Entry".
Below are the example results based on a default installation for 'Sales Transaction Entry':
Result Set:
SECURITYROLEID SECURITYROLENAME SECURITYTASKID SECURITYTASKNAME PRODNAME TYPESTR DSPLNAME RESTECHNAME DICTID SECRESTYPE SECURITYID
----------------------- ------------------------------- ----------------------- ----------------------- ----------------------- --------------- ------------------------------- --------------- ------- --------------- ----------
BOOKKEEPER* Bookkeeper TRX_SALES_001* Enter SOP transactions Microsoft Dynamics GP Windows Sales Transaction Entry SOP_Entry 0 2 619
CUSTOMER SERVICE REP* Customer Service Representative TRX_SALES_001* Enter SOP transactions Microsoft Dynamics GP Windows Sales Transaction Entry SOP_Entry 0 2 619
OPERATIONS MANAGER* Operations Manager TRX_SALES_001* Enter SOP transactions Microsoft Dynamics GP Windows Sales Transaction Entry SOP_Entry 0 2 619
SHIPPING AND RECEIVING* Shipping and Receiving TRX_SALES_001* Enter SOP transactions Microsoft Dynamics GP Windows Sales Transaction Entry SOP_Entry 0 2 619
If there are no Security Roles assigned to the Security Tasks, they will show as blank. If there are no Security Tasks assigned to the Operation, they will also show as blank.
Security Table Information
Security Operations for a Security Task are stored in table sySecurityAssignTaskOperations (SY10700).
Security Tasks are defined in table sySecurityMSTRTask (SY09000).
Security Tasks for a Security Role are stored in table sySecurityAssignTaskRole (SY10600).
Security Roles are defined in table sySecurityMSTRRole (SY09100).
Security Roles for a User and Company combination are stored in table sySecurityAssignUserRole (SY10500).
No comments:
Post a Comment