[NEW] Make directory button toggle-able from admin panel
This adds an option in the admin panel to toggle the directory button in the sidebar. @bizzbyster
thanks for you pull request :smiley: what's the reason/use case for hiding the directory button? I'm asking because a setting might not be the best approach for this.
btw, the directory page should check the same setting otherwise the page will still be accessible if one knows the URL.
Use case is we have a deployment that does not support public groups so the directory is not useful and so just clutters the interface. Does that make sense?
@sampaiodiego if the usecase is as mentioned above or similar then I don't think we need to restrict access to the directory through the url.
for the given use case I'd suggest then to instead of removing the Directory icon from toolbar, to check the view-c-room permission and if the user doesn't have it, then hide the Channels from the Directory page.
then if the user doesn't have permissions to see users and start DMs, hide the Users tab as wel.. AND if the user doesn't have both permissions, then hide the Directory button from toolbar.
does that sound reasonable?
@sampaiodiego I think the point is that in spite of users having all the permissions the directory button needs to be hidden (to unclutter the UI or if it is not useful for some usecase). Is this right @bizzbyster?
In our deployment, we would also like to prevent users from browsing to find other users. So we want to hide this:

Its very important that the Android and the web client provide the same features. This directory functionality is not available in Android so we'd like to remove it from web client as well.
This PR just makes it a configuration option.