From 7af2065deed0a32cf6caf5f03bed24346b2aa4ec Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Sun, 11 Oct 2026 10:22:59 +0200 Subject: [PATCH] docs(AC0031): DeleteAll and ModifyAll require read DeleteAll needs rd and ModifyAll needs rm at runtime; document the implied read in AC0031 and AC0032. Co-Authored-By: Claude Opus 5.5 (1M context) --- content/docs/analyzers/ApplicationCop/AC0031.md | 2 ++ content/docs/analyzers/ApplicationCop/AC0032.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/content/docs/analyzers/ApplicationCop/AC0031.md b/content/docs/analyzers/ApplicationCop/AC0031.md index e4e92d2..075ab75 100644 --- a/content/docs/analyzers/ApplicationCop/AC0031.md +++ b/content/docs/analyzers/ApplicationCop/AC0031.md @@ -53,6 +53,8 @@ The following record method calls trigger this diagnostic: | Modify (`m`) | `Modify`, `ModifyAll`, `Rename` | | Delete (`d`) | `Delete`, `DeleteAll` | +`ModifyAll` and `DeleteAll` also need read (`r`), because they select the affected rows first: `ModifyAll` requires `rm` and `DeleteAll` requires `rd`. `Modify`, `Delete` and `Insert` need only their own permission. A `Permissions = tabledata "Sales Line" = d` entry next to a `DeleteAll` therefore reports a missing `r`. + Calls through the implicit `Rec` variable inside table objects are included (for example, `Rec.Modify()` in a table procedure). `CalcSums` is a SQL aggregate over the receiver table, so it counts as a read on that table. diff --git a/content/docs/analyzers/ApplicationCop/AC0032.md b/content/docs/analyzers/ApplicationCop/AC0032.md index a384181..4b42e22 100644 --- a/content/docs/analyzers/ApplicationCop/AC0032.md +++ b/content/docs/analyzers/ApplicationCop/AC0032.md @@ -73,6 +73,8 @@ codeunit 50100 "Post Sales Invoice" } {{< /highlight >}} +`ModifyAll` and `DeleteAll` count as uses of both read (`r`) and modify (`m`) or delete (`d`): next to a `DeleteAll`, `rd` is fully used, while `rimd` still reports `i` and `m` as unused. `Modify`, `Delete` and `Insert` use only their own permission. + ### Code fix The **ALCops: Remove unused permission** code fix handles both variants: