Added a simple Voter for checking, if a user is allowed, to view/edit/create a part.

This commit is contained in:
Jan Böhmer 2019-03-18 19:05:41 +01:00
parent ab3f5db174
commit 01e1f27b68
10 changed files with 750 additions and 4 deletions

View file

@ -131,6 +131,15 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
return $this->parent_id ?? self::ID_ROOT_ELEMENT; //Null means root element
}
/**
* Get the parent of this element.
* @return StructuralDBElement|null The parent element. Null if this element, does not have a parent.
*/
public function getParent() : ?self
{
return $this->parent;
}
/**
* Get the comment of the element.
*