Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Anonymous Ticket Portal Anonymous Ticket Portal
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • TPA
  • Anonymous Ticket PortalAnonymous Ticket Portal
  • Merge requests
  • !3

Generate User Identifier

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged MariaV requested to merge make_passcode into master Dec 08, 2020
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 7

New Form/View for User Identifier Generation

(Note: So far, none of these actions are touching database.)

Settings.py:

  • Updated with new settings for wordlist location and number of choices from wordlist

File addition

  • Added wordlist.txt (taken from EFF/SecureDrop revised wordlist) to shared folder app

New Form Class:

  • Created a new form class for AnonUser User Identifier generation, including several new methods:
  1. load wordllist
  2. random.sample (no replacement) 6 words from wordlist (# of dice set by settings.py for easy changes)
  3. convert chosen_words list to dictionary (as django requires dict/array style items for template rendering
  4. combination method that calls 1, 2, and 3 sequentially

New Form

  • created a new form from above class and created accompanying url and view.
  • tested with manage.py runserver; list of six words is displayed correctly

Updated 'home' view:

  • added this view/url structure to 'home' view so it can be accessed easily from application load.

12.08.20

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: make_passcode