mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 10:18:56 +02:00
Added a simple Voter for checking, if a user is allowed, to view/edit/create a part.
This commit is contained in:
parent
ab3f5db174
commit
01e1f27b68
10 changed files with 750 additions and 4 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue