sassoftware / sas-portal-app

The purpose of this project is to provide a partial replacement for SAS Information Delivery Portal, that was deprecated as of SAS 9.4M8.
Apache License 2.0
3 stars 5 forks source link

adding group permission portal tree results in ERROR: The object reference to Tree was requested without an identifier. #25

Closed CraigRubendall closed 5 months ago

CraigRubendall commented 6 months ago

When adding a permission portal tree for a group the following error occur when executing https://github.com/sassoftware/sas-portal-app/blob/main/sas/SASEnvironment/SASCode/Samples/managePortalUsers/add-delete-portal-users/createPortalGroup.sas

ERROR: The object reference to Tree was requested without an identifier.

debug_sasdemo@SAS-AAP_updateItem_SAS-AAP.log

CraigRubendall commented 5 months ago

the actual issue here is that the documentation states that for a group permissions tree, the administrator is derived by looking at the permissions on the identity group to associate with this tree and picking the person who has direct writemetadata on the group.

In this case, the customer did not have these permissions set this way on the group, thus when it went to be retrieved, the group admin information was not found and the error occurred.

In this case, that was actually the right thing to do, although the error message should have been better.

The fix is two-fold:

Important NOTE: Regardless of what process is being used to set the administrator on the permissions tree, the administrator MUST be explicitly granted writemetadata on the permissions tree (ie. not through group membership). If this is not followed, this tree will NOT show up in the other screens in the portal app where the admin can save content.