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

Community encryption should automatically switch on/off depending on community permissions #9942

Closed
John-44 opened this issue Mar 18, 2023 · 11 comments · Fixed by #10556 · May be fixed by status-im/status-go#3417
Closed

Community encryption should automatically switch on/off depending on community permissions #9942

John-44 opened this issue Mar 18, 2023 · 11 comments · Fixed by #10556 · May be fixed by status-im/status-go#3417
Assignees
Labels
Milestone

Comments

@John-44
Copy link

John-44 commented Mar 18, 2023

This is a feature for the 0.12 release

-- Change request --

  1. remove the "Encrypt community" toggle from the "Create community" and "Edit community" screens

  2. If the community is an open community (e.g. there are no token permissions to become a member at the community level) then community encryption should automatically be Off

  3. If a community is a closed community (e.g. there are token permissions to become a member at the community level) then community encryption should automatically be On

  4. If an open community becomes a closed community (e.g. if a token permission to become a member at the community level is added) than community encryption should automatically be switched On

  5. If a closed community becomes an open community (e.g. if all token permissions to become a member at the community level are deleted) then community encryption should automatically be switched Off

cc'ing @iurimatias @jrainville

@jrainville jrainville added this to the 0.12.0 milestone Mar 20, 2023
@jrainville jrainville moved this to Iteration Backlog in Status Desktop/Mobile Board Apr 11, 2023
@mprakhov mprakhov moved this from Iteration Backlog to In Progress in Status Desktop/Mobile Board Apr 12, 2023
@mprakhov
Copy link
Contributor

Have a questions

  1. Communities can be marked on creation as encrypted, but I can't make the community encrypted during the edit mode or remove encryption from them if they were created
    Does it mean that the encryption mode can't be changed after the community creation?

If yes, then:

  • we must allow set permissions on community creation, not after (right now we create a community and only after that setting up permissions)
  • switching from closed community to open and backward won't change the encryption settings (steps 4 and 5 from the ticket description)

If the encryption mode can be changed after the community creation:
The request to join option must be set up to make the community encrypted (without the request to join option you can't make a community encrypted).
2. If the user switches from closed community to open - should we keep the request to join option active?
3. If the user switches from open community (without request to join) to closed - the request to join option must be activated. But if we switch back? Do we restore the open community setting and disable the request to join?

cc @John-44, @imagiMary, @jrainville

@mprakhov
Copy link
Contributor

@cammellos Maybe you know the answer:
Is it possible to remove/set encryption for a created community?

@cammellos
Copy link
Contributor

@mprakhov in theory it should work, we need to create an endpoint probably to toggle encryption on & off, but the first step would be to check whether it works after encryption has been toggled, let me know if we should help with that

@mprakhov
Copy link
Contributor

@cammellos if you have a possibility, I would appreciate the help

@cammellos
Copy link
Contributor

@Samyoul could you please look into this? They need an endpoint to toggle community encryption (it should be enough to set encrypted to true or false and republish the community)
Thank you

@Samyoul
Copy link
Member

Samyoul commented Apr 12, 2023

Np @cammellos . I will add a new API endpoint with a method doing something like below:

SetCommunityEncryption(CommunityID string, usesEncryption bool) error {
   // Get Community
   // Check usesEncryption is different to Community's value
   // If not different return
   // if usesEncryption true:
   //   🪄 The magic that encrypts a community
   // Else:
   //   🧙 The magic that decrypts a community
   // Republish the community.
}

@mprakhov
Copy link
Contributor

@Samyoul could you please give some updates on where an API will be ready and merged?

@Samyoul
Copy link
Member

Samyoul commented Apr 21, 2023

@mprakhov This is the PR status-im/status-go#3417 . I'm adding tests and it'll be ready for review. So hopefully can be merged today / Monday

@anastasiyaig
Copy link
Contributor

@John-44 @benjthayer could u please guys help me clarifying the following: do we show / indicate anywhere that community is encrypted? I found only this place (screenshot below)

Screenshot 2023-05-04 at 15 30 21

Since we removing this checkbox completely - do we want to highlight that community is encrypted and if yes, in which cases and where in UI? Sorry if this has been clarified before, i was not able to find the designs myself :(

@benjthayer
Copy link

Hey @anastasiyaig I wasn't involved in the discussions around removing the checkbox so will leave for @John-44 to confirm :)

@John-44
Copy link
Author

John-44 commented May 4, 2023

@John-44 @benjthayer could u please guys help me clarifying the following: do we show / indicate anywhere that community is encrypted? I found only this place (screenshot below)

Screenshot 2023-05-04 at 15 30 21

Since we removing this checkbox completely - do we want to highlight that community is encrypted and if yes, in which cases and where in UI? Sorry if this has been clarified before, i was not able to find the designs myself :(

We don't want to explicitly say a community is encrypted or not anywhere in the UI. What we do want to say is if a community is "token gated or not", or if a channel is "token gated or not" with the implication that if it is token gated then it's encrypted, if it's not token gated then it's not encrypted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment