$object.canWrite()
canWrite($object)
Checks whether the currently logged-in user is allowed to modify the given object (object-level write access) and returns a boolean.
The function never fails and never filters; it lets a script check write access up front instead of running into the permission error that a modifying operation would raise.
The check is evaluated for the currently logged-in user and follows the same rules as the implicit permission enforcement: deny-by-default, role inheritance along the security hierarchy, and full access for administrators or executions in a system context.
| Name | Type | Type Description | Mandatory | Default |
|---|---|---|---|---|
| object | Business object | The object whose write access is checked. | yes |
Type: Boolean
true if the current user may modify the object, false otherwise (in particular for null).
all(`my.module:Contract`).filter(c -> $c.canWrite())
Output: All contracts that the logged-in user is allowed to modify.