You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling delete() on a record (without changing what versioned state you're operating in), the record actually ends up being archived. While it is more correct to call doArchive() instead of delete() if you intend to archive the record, it's not uncommon to just call delete() directly.
Because of this, it's easy to call canDelete() as the permission check before archiving a record, forgetting that there's a specific canArchive() method that should be called instead.
Don't merge these until the CMS 5 PRs have been merged and merged up.
If there are merge conflicts (which there almost 100% will be) reassign to Guy to resolve.
When calling
delete()
on a record (without changing what versioned state you're operating in), the record actually ends up being archived. While it is more correct to calldoArchive()
instead ofdelete()
if you intend to archive the record, it's not uncommon to just calldelete()
directly.Because of this, it's easy to call
canDelete()
as the permission check before archiving a record, forgetting that there's a specificcanArchive()
method that should be called instead.This has lead to at least one issue in the past.
We should consider whether to remove the
canArchive()
permission method, and just assume thatcanDelete()
is alwayscanArchive()
.Note
Acceptance criteria
CMS 5 PRs
CMS 6 PRs
Important
Don't merge these until the CMS 5 PRs have been merged and merged up.
If there are merge conflicts (which there almost 100% will be) reassign to Guy to resolve.
The text was updated successfully, but these errors were encountered: