Repository: ampache/ampache (language: php)

Issue:
Statistics no longer showing
Hi all,

Just a quick one, I'm on the latest develop commit and the Statistics page has stopped showing for me?

I get the following error in the ampache logs:

``(/var/www/html/ampache/resources/templates/stats.xhtml:67) -> Ampache\Gui\Catalog\CatalogDetails object  doesn't have method/property named 'getFilterUser' ``

Probably related to the per user catalogue features recently added?


Discussion / hints:
For me too, same error, i would have opened this bug now.

>Probably related to the per user catalogue features recently added?

For sure, the error is catalog related, maybe a method not implemented.
What is the goal with that method?  It would appear to indicate whether the catalog is specific to a user or if it's public, which means that column probably isn't valid any more with the newer catalog feature.

Also, I think that statistics for non-authorized catalogs should be hidden from the user.  The last thing an admin wants is for users to know what catalogs are available and start asking for access to those catalogs.  The admin denied access for a reason, I would guess.

I appears that users don't have access to that menu.  Only access levels above users (catalog managers, content managers, admin) seem to have it.  Removal of the column should fix the problem.

Fix patch:
diff --git a/resources/templates/stats.xhtml b/resources/templates/stats.xhtml
index 19d0abb11a..ad8647f0f7 100644
--- a/resources/templates/stats.xhtml
+++ b/resources/templates/stats.xhtml
@@ -52,7 +52,6 @@
     <tr class="th-top">
         <th class="cel_catalog" i18n:translate="">Name</th>
         <th class="cel_path" i18n:translate="">Path</th>
-        <th class="cel_filter" i18n:translate="">Catalog User</th>
         <th class="cel_lastverify" i18n:translate="">Last Verify</th>
         <th class="cel_lastadd" i18n:translate="">Last Add</th>
         <th class="cel_lastclean" i18n:translate="">Last Clean</th>
@@ -64,7 +63,6 @@
     <tr tal:repeat="CATALOG STATS/getCatalogDetails">
         <td class="cel_catalog" tal:content="CATALOG/getName">CATALOG NAME</td>
         <td class="cel_path" tal:content="structure CATALOG/getFullInfo">FULL INFO</td>
-        <td class="cel_filter" tal:content="structure CATALOG/getFilterUser">FULL INFO</td>
         <td class="cel_lastverify" tal:content="structure CATALOG/getLastUpdateDate">LAST UPDATE DATE</td>
         <td class="cel_lastadd" tal:content="structure CATALOG/getLastAddDate">LAST ADD DATE</td>
         <td class="cel_lastclean" tal:content="structure CATALOG/getLastCleanDate">LAST CLEAN DATE</td>
@@ -75,4 +73,4 @@
     </tr>
     </tbody>
 </table>
-</html>
\ No newline at end of file
+</html>


Test patch: