For an authenticated user when using the add media in WYSIWYG uploaded files are not displayed within the Library tab.
We have made the user an EDITOR and given the EDITOR role the same permissions as an Administrator;
- Bypass file access
- Administer file
- Administer files
- Add and upload new files
- View own private
- View own files
- View private files
- View files

Administrator can see the files but not the EDITOR.

File System Settings
Public file system path: sites/default/files
Private file system path: sites/default/files/private
Default download method: Private local files served by Drupal.

WYSWIG Profile: TinyMCE 3.5.11

Comments

bherring created an issue. See original summary.

bherring’s picture

Issue summary: View changes
bherring’s picture

mpotter’s picture

Do not use the method used in #3. That essentially turns off all file access control for Media, which will make private files accessible to people who shouldn't have access.

In Open Atrium, access to files is controlled by the node that has the file attached to it. If the node is in a Space that you don't have access, then the files attached to that node won't have access.

When you first click the Library tab in the Media browser, notice that there is a Space filter that is only showing you files within your current space. You can change that filter to "Any" and update the list to see all files you have access to across the whole site.

The "My Files" tab also has a Space filter, but it is set to Any by default and will show any files that you have uploaded yourself to other content.

Giving "editor" role to users isn't enough. Those editor users also need to be members of the space to be able to access the content. If you need a global editor group for your entire site, create an Atrium Group called "Admins", add your editor users as members of this group, then add this group as a parent of your top-level spaces. If you are using the default inheritance, then these editors will be considered members of all the spaces on the site.

bherring’s picture

I don't quite understand what is going on.
I have created a user, made the user an editor and made them a direct member of the space.
The user can create content, upload an image and publish the content.
Try to create a second piece of content in the same space and the image just uploaded is not accessible in the Library tab even when the space filter is set to any, nor in the My Files tab.

The media browser appears to be only showing files from sites/default/files instead of sites/default/files/private where the files are stored once uploaded by the user.

mpotter’s picture

Category: Bug report » Feature request
Status: Active » Postponed

The only media you can re-use via the Library and My Files is media that is *attached* to a document, either via the Attachments field or via the Media Gallery paragraphs. You cannot re-use media uploaded from the WYSIWYG. Media embedded within the WYSIWYG is not access-controlled. It is publicly accessible and outside of the control of Open Atrium. We added all the options to the media gallery paragraph so you wouldn't need to embed stuff in the WYSIWYG anymore.

We recently changed the Media browser specifically to NOT show un-managed file content. I'll see if we can make this an option, but we really want to discourage embedding stuff into the WYSIWYG.

mpotter’s picture

Status: Postponed » Fixed

I pushed commit 5c07d4f to oa_media to allow it to show *all* files when the "Any" space filter is selected when using it from a WYSIWYG.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cgove’s picture

Status: Closed (fixed) » Active

On latest OA, 2.5 with fresh install, files don't show up with -Any- selected in the WYSIWYG Media browser unless "Bypass content access control" permission is given to the user. Shouldn't the user at least be able to see their own files? Own private file permissions only seems to work for files added through attachments, even after this patch.

Argus’s picture

Hmmm, that smells like a non-OA issue.

bhatti’s picture

The Latest OA 7.x-2.65 again has the "WYSIWYG Media Library No Files" issue whereas the previous version7.x-2.64 didn't. In the latest version, files don't show up in the media browser even for the administrator (or any space member) and even for files that have been attached to the document within a space.

mpotter’s picture

I believe there is still a bug where the first time the Media Browser is displayed, it says "-Any-" for the space filter, but in fact it is still filtering on only the current space. If you select a space in the filter and click Apply and then re-select "-Any-" and click Apply again then you'll see all media again.