Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/docs/analyzers/ApplicationCop/AC0031.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions content/docs/analyzers/ApplicationCop/AC0032.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading