Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
Script to remove user and make their entries anonymous
Browse files Browse the repository at this point in the history
Script will find a user by provider id, find the all entries where they
are a submitter or review, and change the submitterId or reviewerId to
the site's anonymous user, then the user will be removed.

`$ npm run anonymize_user -- <provider id>`

The flag `-d` can be passed to perform a dry-run, where the user id, and
relevant entry ids will be printed, but no changes made.
  • Loading branch information
brew committed Jun 21, 2018
1 parent 0f57df7 commit be8f558
Show file tree
Hide file tree
Showing 4 changed files with 531 additions and 154 deletions.
13 changes: 9 additions & 4 deletions README.md
Expand Up @@ -99,15 +99,20 @@ To update the translations cache, run:

Any column can be internationalised by adding another column with `@locale` after it. For example, the `description` column can be translated to German by adding a column of `description@de`. Only languages which have template translations created for them are valid. The `locales` setting in the config document can be used to restrict the number of locales available. The first locale in the list is the default locale.

### Removing a user

A script is provided to remove users by provider id. Removing a user will update entries where the user is a submitter or reviewer (changing the user id to the anonymous user), then remove the user.

`$ npm run anonymize_user -- <provider-id>`

Use `-d` to perform a dry run, which will print the user id, and entry ids which will be affected (where the user is either a submitter or reviewer).


### Running Tests

```
createdb opendatacensus_test
npm test
```

------

## Heroku Deployment

TBD: This section needs to be updated. The basics of deployment now are just to use the normal heroku commands, as now, one codebase powers multiple census sites.

0 comments on commit be8f558

Please sign in to comment.