Do not display "Private Folder"

Introduction

In the layout editor, for each folder users don’t have access to “Private Folder” will be displayed, making accessible folders harder to identify.

User Story

In our environment we have multiple users that can create and modify lay-outs. For each user, they have their own folder which only they and the administrators have access to.

When a user is editing a layout, filtering on which folder the media is located in, the dropdown returns “Private Folder” for each folder that the user does not have access to.

For the user, this makes it harder to find the folders they do have access to, and their wish is to not see the “Private Folder” at all.

Implementation

I have created a pull request on Github that solves this problem.

xibo-cms/lib/Controller/Folder.php at line 202:


Before:

if (!$this->getUser()->checkViewable($child)) {
	$child->text = __('Private Folder');
	$child->type = 'disabled';
}

After:

if (!$this->getUser()->checkViewable($child)) {
	continue;
}

Impacted Software

Only Xibo CMS in the following places:

  • Layout editor when filtering by folder.
  • Folder tree in Media, Layouts, Campaigns, etc.