/** * Handles access to the distribution add form through solution pages. * * @param \Drupal\rdf_entity\RdfInterface $rdf_entity * The asset release RDF entity for which the distribution is created. * * @return \Drupal\Core\Access\AccessResult * The access result object. */ public function createAssetDistributionAccess(RdfInterface $rdf_entity) { // Create a new distribution entity in order to check permissions on it. $distribution = $this->createNewAssetDistribution($rdf_entity); return $this->ogAccess->userAccessEntity('create', $distribution); }
/** * Handles access to the asset_release add form through solution pages. * * @param \Drupal\rdf_entity\RdfInterface $rdf_entity * The RDF entity for which the custom page is created. * * @return \Drupal\Core\Access\AccessResult * The access result object. */ public function createAssetReleaseAccess(RdfInterface $rdf_entity) { return $this->ogAccess->userAccessEntity('create', $this->createNewAssetRelease($rdf_entity), $this->currentUser()); }