I would like to restrict the ability for users to add Media to a directory. For example, on a current project, only admins should be able to organize the media into directories.
As-is I can disallow users from creating new folders with taxonomy permissions. With
β¨
Expose setting to enable drag and drop functionality
RTBC
I can disable the ability to drag and drop media in the UI, but the "Add Media" form passes active_directory
into the form state, which sets a hidden value:
$form['active_directory'] = [
'#type' => 'hidden',
'#value' => $this->getDirectory($form_state),
];
This bypasses field permissions on the "directory" field I have configured. So even if the user does not have access to that field, the media is still added to the directory that the user was in when the button was pressed.
Implement permission checks that user has access to the directory field on create/update operations.
Alternatively, instead of using a hidden value on the form, adjust the code to explicitly set the directory field value, if it exists.
Decide on an approach and write code to implement.
Add a status message that lets the user know that the media they added could not be added to the folder due to permissions.
n/a
n/a
Needs work
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.