- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Shouldn't this be possible here, based on the config settings?
/** * Returns an array of additional media type permissions. * * @return array * The media type permissions. * * @see \Drupal\user\PermissionHandlerInterface::getPermissions() * @see \Drupal\media\MediaPermissions::mediaTypePermissions() */ public function mediaTypePermissions() { $perms = []; // Generate additional media permissions for all media types. $media_types = $this->entityTypeManager ->getStorage('media_type')->loadMultiple(); /** @var \Drupal\media\MediaTypeInterface $type */ foreach ($media_types as $type) { $perms += $this->buildPermissions($type); } return $perms; } /** * Returns a list of media permissions for a given media type. * * @param \Drupal\media\MediaTypeInterface $type * The media type. * * @return array * An associative array of permission names and descriptions. */ protected function buildPermissions(MediaTypeInterface $type) { $type_id = $type->id(); $type_params = ['%type_name' => $type->label()]; return [ "view $type_id media" => [ 'title' => $this->t('%type_name: View media', $type_params), ], ]; }
(/src/MediaPrivateAccessPermissions.php)
- 🇩🇪Germany Anybody Porta Westfalica
Just came across this again and I think this is really important for UX. Changing this from bug - as it's not a clear bug - to a major feature request.
In the current situation it's not clear that these permissions simply have NO effect however they are configured. That makes no sense and leads to confusion.