AL icon indicating copy to clipboard operation
AL copied to clipboard

Namespaces causing issues while generating permission sets in vscode

Open rickblommetjes opened this issue 1 year ago • 0 comments

1. Describe the bug Based at running issue and support call not being able to upload an PTE extention due to missing permision of an table, while it was in the permisison object using for example the byreference "using easystep2.warehouse.journal;" and not the full path of the object.

The workaround for above issue was to generate the permission set with full reference to the namespaces.

However on top of that i noticed the problem when you add an object with the same name but within my namespace like easystep2.warehouse.journal and you don't have the using statement correct in the permissions like microsoft.warehouse.journal for example I have the codeunit "WMS Management" in the permission set, it will conflict with the easystep2.warehouse.journal namespace. only when putting the object in the permision object with the full namespaces it works.

image

However when generating in the permisionset object all objects like this and I update the permisionset with the following command "AL: Generate permission set as AL object containing current extention objects" it will add the objects without the Namespaces and it ignores the existing line with the full path.

2. To Reproduce Generate a permissionset object add a namespace to the permission object and add the missing namespace references with the code action using the option add full path references within this document.

image

and run the command "AL: Generate permission set as AL object containing current extention objects"

  1. Go to '...'

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior Either allways force the permissionset to be generated with the full namespace references and that at least both scenario's are recognized and it won't add new lines for lines which are allready there with the full path.

4. Actual behavior A clear and concise description of what happened accompanied by images, animations, or a link to a video showing the issue occurring

5. Versions:

  • AL Language: v12.5.914975

  • Visual Studio Code: Version: 1.85.2 (user setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631

  • Business Central: BC23.3

  • List of Visual Studio Code extensions that you have installed: Removed all non related extentions and the problem still exist

rickblommetjes avatar Feb 01 '24 09:02 rickblommetjes