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

Add privacy methods to the TrackerMode enum #871

Merged

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented May 17, 2024

The tracker mode can be:

  • Public (Non-whitelisted)
  • Listed (Whitelisted)
  • Private (Non-whitelisted)
  • PrivateListed (Whitelisted)

There should have been two different flags (in my opinion):

  • Visibility: public or private
  • Whitelisted: true or false

So we would have the same four combinations:

  • Not whitelisted:
    • Public
    • Private
  • Whitelisted
    • Public
    • Private

That's a pending refactor. For this PR, the goal is just to align this enum with what we added to the Index so we can use it in the Index via the primitive crate.

See https://github.com/torrust/torrust-index/blob/develop/src/config.rs#L140-L171

@josecelano josecelano self-assigned this May 17, 2024
@josecelano josecelano added this to the v3.0.0 milestone May 17, 2024
@josecelano josecelano linked an issue May 17, 2024 that may be closed by this pull request
@josecelano
Copy link
Member Author

josecelano commented May 17, 2024

ACK 08179e3

@josecelano josecelano requested a review from da2ce7 May 17, 2024 14:51
Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 7.40741% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 78.62%. Comparing base (d4eaea9) to head (0c9da2f).

Files Patch % Lines
packages/primitives/src/lib.rs 3.84% 25 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #871      +/-   ##
===========================================
- Coverage    78.83%   78.62%   -0.21%     
===========================================
  Files          170      170              
  Lines         9394     9419      +25     
===========================================
  Hits          7406     7406              
- Misses        1988     2013      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano josecelano added the Needs Rebase Base Branch has Incompatibilities label May 20, 2024
The tracker mode can be:

- Public (Non-whitelisted)
- Listed (Whitelisted)
- Private (Non-whitelisted)
- PrivateListed (Whitelisted)

They should have been two different flags (in my opinion):

- Visibility: public or private
- Whitelisted: true or false

So we would have the same four convinations:

- Not whitelisted:
 - Public
 - Private
- Whitelisted
 - Public
 - Private

That's a pending refactor. For this commits, the goal is just to align
this enum with what we added to the Index so we can use this enum in the
Index via the primmitives crate.
@josecelano
Copy link
Member Author

ACK 0c9da2f

@josecelano josecelano merged commit b92401f into torrust:develop May 21, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Rebase Base Branch has Incompatibilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align TrackerMode with Index
1 participant