Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Convert to PermissionSet objects" ignores included permission sets #438

Open
TF-PDJ opened this issue Jun 19, 2023 · 0 comments
Open

"Convert to PermissionSet objects" ignores included permission sets #438

TF-PDJ opened this issue Jun 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@TF-PDJ
Copy link

TF-PDJ commented Jun 19, 2023

Describe the bug
BC21 introduced the ability to include a permission set in a permission set, but these includes are not updated with the current "Convert to PermissionSet objects" function

Versions used
VSCode: 1.79.1
NAB AL Tools: 1.30

To Reproduce
Steps to reproduce the behavior:

  1. Create a new permission set which includes a Tenant permission set from an app
  2. Create a new version of the app without the permission set xml file but with a permission set object and an upgrade codeunit using the "Convert to PermissionSet objects"
  3. Publish and install the new app
  4. Look at the permission set created in step 1 - it still refers to the (now non-existing) tenant permission set.

Expected behavior
The permission set should be updated to include the new System permission set.

Screenshots
N/A

Additional context
The relation is stored in table 2000000253: Tenant Permission Set Rel.
I didn't have to change the permission set code, so I could simply fix it like this:
TenantPermissionSetRel.SetRange("Related App ID", _AppId);
TenantPermissionSetRel.SetRange("Related Scope", TenantPermissionSetRel."Related Scope"::Tenant);
TenantPermissionSetRel.SetRange("Related Role ID", _PermissionSetCode);
TenantPermissionSetRel.ModifyAll("Related Scope", TenantPermissionSetRel."Related Scope"::System);
Please notice that the Scope fields are not included in the PK so the update process is a bit different as your function both have to rename and modify. (or delete and insert)

  • Does it happen all the time?
    We have only seen the issue at three customers so only a few companies seems to use this new functionality.

  • Did it used to work?
    N/A

@TF-PDJ TF-PDJ added the bug Something isn't working label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant