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

feat: LEAP-1515: Hide PII by condition #6544

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

hlomzik
Copy link
Collaborator

@hlomzik hlomzik commented Oct 22, 2024

In order to reduce a bias organization can now enable org setting annotator_reviewer_firewall_enabled to hide all related identifying information in annotations:

  • User names and avatars are replaces with "Me" for current user and "User" for all other users.
  • This applies to comments, annotation history, annotation tabs, view all.
  • Annotation id is hidden (task id is shown though).
  • Dates are also hidden for now.

Technically it's done by passing new LSF interface annotations:hide-info and changing UI by condition.

Label Stream

Screenshot 2024-10-22 at 23 38 23

Quick View with other users involved

Screenshot 2024-10-22 at 23 35 50

It is advised to hide Data Manager for projects in such organizations.

PR fulfills these requirements

  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

What alternative approaches were there?

Hide this data on backend — frontend solution is easier and good for now.
Also we could add styles just to hide some elements, but that would not allow us to replace text and would be harder to maintain.
Also we could dynamically change the data via Custom Scripts, but that's uncontrollable and unstable because of dynamic nature of this data.

What feature flags were used to cover this change?

No FFs, the feature is hidden behind org setting annotator_reviewer_firewall_enabled.

Does this PR introduce a breaking change?

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

With new LSF interface `annotations:hide-info` hide all personal info about users and annotation, including ids and dates.
It should be visually connected with labeling area
@github-actions github-actions bot added the feat label Oct 22, 2024
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 63c5877
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/6717c57f542896000865ff92

Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 63c5877
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/6717c57ff7cc550008a5cdb2

@@ -55,6 +55,8 @@ const DraftState: FC<{
}> = observer(({ annotation, inline, isSelected }) => {
const hasChanges = annotation.history.hasChanges;
const store = annotation.list; // @todo weird name
const infoIsHidden = store.store.hasInterface("annotations:hide-info");
const hiddenUser = infoIsHidden ? { email: "Me" } : null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that the user who will be replaced by "Me" is not actually the current one?

Copy link
Collaborator

@Gondragos Gondragos Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nwm. Looks like with annotations:hide-info we are going to prevent such cases from appearing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants