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

Administration > Workspace is visible for usual users

Open krenuser opened this issue 2 years ago • 12 comments

Description:

Administration > Workspace menu item is visible and available for usual users, though contents of this page are not loading:

image

Steps to reproduce:

  1. Login as usual user on RC 5.2.0
  2. Open Administration > Workspace menu item

Expected behavior:

Neither Administration, nor Administration > Workspace item should not be visible to usual users.

Actual behavior:

Menu item is visible for usual users, contents of opened page aren't loading.

Server Setup Information:

  • Version of Rocket.Chat Server: 5.2.0
  • Operating System: Linux Ubuntu 20.04
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: v14.19.3
  • MongoDB Version: 5.0.13 / wiredTiger

Client Setup Information

  • Desktop App or Browser Version: Desktop 3.8.12 / Browser
  • Operating System: Windows 10

Additional context

none

Relevant logs:

No relevant logs neither in DevTools, nor on server side.

krenuser avatar Oct 16 '22 09:10 krenuser

Hi! I was not able to reproduce this issue =\

Can you get the infos from the user you created? When you edit a user, you can get that json from the network tab in browser developer tools, like so:

image

dudanogueira avatar Oct 17 '22 12:10 dudanogueira

image Found out that this behavior was caused by "Omnichannel settings" menu availability, due to livechat-manager role that user actually has. This item makes [ ⁞ ] ("Administration") button visible along with "Workspace" item (that shouldn't be visible).

IKrendelev avatar Oct 17 '22 14:10 IKrendelev

Yep, that's true.

That's a good first issue for our #hacktoberfest :)

dudanogueira avatar Oct 17 '22 16:10 dudanogueira

@krenuser are you working on it?

nishant23122000 avatar Oct 17 '22 17:10 nishant23122000

@krenuser are you working on it?

No, I haven't set up fully functional dev environment for that yet (I have a bit different dev specialization). Maybe, some of my future bug reports...

krenuser avatar Oct 18 '22 09:10 krenuser

ok, can I work on that?

nishant23122000 avatar Oct 18 '22 11:10 nishant23122000

ok, can I work on that?

Don't have any objections.

krenuser avatar Oct 18 '22 12:10 krenuser

Hi @nishant23122000 , is this issue being worked on? if not I could work on it, please confirm

mani-rsg avatar Oct 22 '22 14:10 mani-rsg

image Found out that this behavior was caused by "Omnichannel settings" menu availability, due to livechat-manager role that user actually has. This item makes [ ⁞ ] ("Administration") button visible along with "Workspace" item (that shouldn't be visible).

Regular user with only user role don't have any administrations menu. Guess that menu comes from bot or one of livechat roles, which is bug definitely.

ankar84 avatar Oct 24 '22 03:10 ankar84

Can I take up this issue?

rksingh2001 avatar Nov 04 '22 10:11 rksingh2001

Hey @dudanogueira, the livechat manager role should offer the omnichannel option in the administration menu and not the workspace option right? Doing this is failing the unit test cases created for the AdministrationModelList as the test cases are searching for workspace option always and thus, I think the test case needs to be modified in order to solve this issue.

Barrylimarti avatar Dec 17 '22 12:12 Barrylimarti

hi @Barrylimarti! you are right!.

However, before that, there are failing tests that I am not sure it is related: https://github.com/RocketChat/Rocket.Chat/actions/runs/3393376349/jobs/5640641602#step:42:6

I have pinged our good friend @filipemarins that can help us here :)

dudanogueira avatar Dec 22 '22 21:12 dudanogueira