silverstripe / silverstripe/developer-docs

Need clearer documentation about "canDelete" being used for archive permissions on versioned objects

Open
#118 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/docs
Dominant language
No language data
Stars
7
Forks
74
Avg merge
1d 14m
Merged PRs (30d)
6

Description

If you create a page type with a canDelete(...) return false; in it, it becomes impossible to delete an elemental on this page type. You have to override any elemental's canDelete(...) function in order to get it to work

See BaseElement.php line 251 in canDelete($member = null)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BaseElement.php at line 251 and read the canDelete($member = null) behavior described in the issue. Trace how a page type's canDelete result affects deletion of elementals and identify the developer documentation location that should explain the archive-permission interaction. Done means the documentation clearly explains when an elemental override is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.