Page MenuHomePhorge

When destroying a Project, all Sub-Projects are "You Shall Not Pass: Restricted Project"
Open, WishlistPublic

Description

Steps to reproduce:

  • Create project "A"
  • Create sub-project "B"
  • Destroy project "A" with ./bin/remove destroy PHID-OF-A
  • Visit project "B"

What happens:

You Shall Not Pass: Restricted Project
Users with the "Can View" capability:
Logged in users can take this action.
Members of a project can always view it.

So, the sub-project visibility is broken.

What should happen instead:

The sub-project (that now is supposed to be a root-project) should still be visible.

NOTE: Somebody may proposed to nuke also all sub-projects, but this is overkill. If you really want to drop also sub-projects, people should run ./bin/remove destroy also on the PHIDs of sub-projects, probably.

Revisions and Commits

Event Timeline

valerio.bozzolan triaged this task as Wishlist priority.
valerio.bozzolan created this object in space S1 Public.

The solution was to take direct children project and call $child->setParentProjectPHID($my_parent_phid).

Also, we need to call save() on every single child at whatever level to re-consolidate their depth and an internal field called "path key".