core/src/Security/Voter/ItemVoter.php
/**
     * Validate if a user can edit a standard.
     */
Validate if a user can edit a standard.
Validate if a user can edit a standard .
private function canEdit(LsItem $item, TokenInterface $token): bool
    {
        if (!$item->getLsDoc()->canEdit()) {
            return false;
        }
        if (!$item->canEdit()) {
            return false;
        }
        if ($this->deferDecision($token, [FrameworkAccessVoter::EDIT], $item->getLsDoc())) {
            return true;
        }
        return false;
    }
private function canEdit ( LsItem $ item , TokenInterface $ token ) : bool { if ( ! $ item -> getLsDoc ( ) -> canEdit ( ) ) { return false ; } if ( ! $ item -> canEdit ( ) ) { return false ; } if ( $ this -> deferDecision ( $ token , [ FrameworkAccessVoter :: EDIT ] , $ item -> getLsDoc ( ) ) ) { return true ; } return false ; }
Validate if a user can edit a standard.
Validate if a user can edit a standard .
// The framework is not editable // The item is not editable // Allow editing of an item if the user can edit the document