Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[NEW] Make directory button toggle-able from admin panel

Open ubarsaiyan opened this issue 7 years ago • 6 comments

This adds an option in the admin panel to toggle the directory button in the sidebar. @bizzbyster

ubarsaiyan avatar Dec 12 '18 21:12 ubarsaiyan

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.

sampaiodiego avatar Jan 21 '19 10:01 sampaiodiego

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?

bizzbyster avatar Jan 21 '19 13:01 bizzbyster

@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.

ubarsaiyan avatar Jan 21 '19 13:01 ubarsaiyan

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 avatar Jan 22 '19 11:01 sampaiodiego

@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?

ubarsaiyan avatar Jan 22 '19 18:01 ubarsaiyan

In our deployment, we would also like to prevent users from browsing to find other users. So we want to hide this:

image

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.

bizzbyster avatar Jan 22 '19 20:01 bizzbyster