Open tkroes opened 3 months ago
Or add an extra options. ' Add indirect permissions to all object...'.
Also replace old indirect permissions if those exists.
This
Permissions =
tabledata "Cust. Ledger Entry" = r;
becomes
Permissions =
tabledata "Cust. Ledger Entry" = Rr;
Which gives this compiler error:
And then we have this mess in BC25...
Personally, I would prefer indirect permissions as default because most of our converted/new code uses those and changing them to direct will add unnecessary changes to Git diff. AFAIK, choice of direct/indirect permissions should not matter since the AL code in procedures and triggers will only use indirect permissions.
Agreed, both the option to quick fix and add missing permissions on an editor and project scale with a command are crucial to quickly address the notice.
Also replace old indirect permissions if those exists.
This
Permissions = tabledata "Cust. Ledger Entry" = r;
becomes
Permissions = tabledata "Cust. Ledger Entry" = Rr;
I don't really understand why you would want that - wouldn't that mean that indirect permissions would never be allowed?
In the preview version of the Business Central LinterCop by Stefan Maroń there is a new rule to ensure that table data has the correct indirect permissions in an object. Ideally the permissions added to comply with this rule would be indirect, but currently this extension only adds direct permissions (using the light bulb/"quick fix" on an object's name to add table permissions) without option to change it to indirect. I think adding a setting for this, and defaulting it to direct permissions in order to not break existing workflows, would be ideal to solve this problem for us.