Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hideIfPermissionsNotMet flag is always false and hidden channels are visible #14608

Closed
Parveshdhull opened this issue May 5, 2024 · 10 comments · Fixed by status-im/status-go#5116
Assignees
Labels
backend-team bug Something isn't working E:Desktop Comm Perms and Minting MVP Misc tasks about Community permissions that are not part of another Epic, due for the MVP
Milestone

Comments

@Parveshdhull
Copy link
Member

Bug Report

Description

While creating a channel I have selected Hide channel from members who don't have permission to view the channel.
But hideIfPermissionsNotMet is always false. I created this channel in 2.28.1-rc.6 and checked these channels in mobile client and desktop.
Also checked in 2.28.0

Steps to reproduce

Step 1: Create a channel with hideIfPermissionsNotMet true and add permission token
Step 2: Open member account who have access/joined the same community but don't have required token for the channel view access
Step 3: Channel is still visible

Expected behavior

Channel should not be visible

Actual behavior

Channel is visible

Additional Information

  • Status desktop version: 2.28.1-rc.6
  • Operating System: Arch Linux
@Parveshdhull Parveshdhull added the bug Something isn't working label May 5, 2024
@Parveshdhull
Copy link
Member Author

required for status-im/status-mobile#19885

@jrainville
Copy link
Member

We confirmed that the Status Community still works correctly on RC6 (the channel that should be hidden are indeed hidden).

Can you post screenshots of the settings and permissions and the resulting visible channel. It would be good to see if everything is setup correctly.

@Parveshdhull
Copy link
Member Author

Thank you @jrainville for looking into this and your quick response. Here is the video with the steps.

output-2024-05-06_20.31.59.mp4

@jrainville
Copy link
Member

Thanks for the video. It does seem like there is an issue.

We can see in the Owner screen that the channel's status does update correctly. The member list gets updated so that only the Owner is present in the list, filtering out the other members that do not have ETH.

However, on the member account, you can still see the channel. The member list is empty, so I wonder it's related to this issue: #14442

If you restart the app, does the channel finally get removed? And does the channel list stay empty? In theory, that's normal, because the member list is encrypted.

So either on first receiving the channel, the app doesn't compute the hideIfPermissionsNotMet property or there it's something completely broken. But then how does it work in the Status community 🤔

@Parveshdhull
Copy link
Member Author

so I wonder it's related to this issue: #14442

hi @jrainville, Even in mobile these community channels have hideIfPermissionsNotMet flag always false. So not sure if its related to members but more likely bug is happening while creating channel itself

But then how does it work in the Status community

Don't know, maybe status community are channels created before this bug.

@Parveshdhull
Copy link
Member Author

If you restart the app, does the channel finally get removed?

No

And does the channel list stay empty?

Yes channel member list stays empty

@jrainville
Copy link
Member

jrainville commented May 6, 2024

I can reproduce it seems. Something is weird indeed. It seems like old channels are hidden correctly, but newer ones aren't.

In this screenshot, the owner sees the two hidden channels, and the member on the right only sees one, even though he shouldn't see any of them.
image

I see that the new hidden channel doesn't have the lock icon, so I think the issue is that we don't associate the permission correctly.

However, on further inspection, there is a bigger issue. Somehow, I have admin access, even though that account doesn't have a TokenMaster or Admin token. So something went very wrong in the evaluation of members. I know I have the "Pokt and Infura" down banner, so maybe it has something to do?

Anyway, we're gonna try to fix it for 2.29 as this seems like a very big issue.

edit: FYI, I am testing latest master, so maybe there is an additional problem

@jrainville jrainville added this to the 2.29.0 Beta milestone May 6, 2024
@jrainville jrainville added backend-team E:Desktop Comm Perms and Minting MVP Misc tasks about Community permissions that are not part of another Epic, due for the MVP labels May 6, 2024
@jrainville
Copy link
Member

Ah! I made a discovery! It seems like the issue only happens when the "Hide permission" check box is selected.
I have no idea why that is the case, but it seems like it makes the issue appear.

"Hie Permission" ON -> Channel appears
"Hide Permission" OFF -> Channel doesn't appear

@Parveshdhull
Copy link
Member Author

@jrainville Thank you very for fixing the issue.

I am currently using a build (#11) from #14537, as this also includes your fix, but I am not able to add permission

output-2024-05-12_18.00.07.mp4

@jrainville
Copy link
Member

but I am not able to add permission

@Parveshdhull , that seems like a UI bug. It would be very kind of you to open it in an other issue.

If you want to create a permission in the meantime, I recommend using the Admin panels. Click on the community name at the top -> Permisisons -> Add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend-team bug Something isn't working E:Desktop Comm Perms and Minting MVP Misc tasks about Community permissions that are not part of another Epic, due for the MVP
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants