Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Gitlab Lobby Gitlab Lobby
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 20
    • Issues 20
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • TPA
  • Gitlab LobbyGitlab Lobby
  • Merge requests
  • !8

Notify Admin of New Account Requests -- Refs #13

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open mfonism requested to merge mfonism/gitlab-lobby:13-notify-admin-of-pending-lobby-requests into main Oct 14, 2020
  • Overview 0
  • Commits 2
  • Changes 8

This MR uses django-sendgrid to notify admin of the creation of new account requests.

Until #5 (closed) is totally resolved, some housekeeping is required for this to work well on one's local computer.

In particular, the following block has to be added to settings.py

# Email (SendGrid) settings
ADMIN_EMAIL = os.getenv("ADMIN_EMAIL")
if DEBUG:
    EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
else:
    EMAIL_BACKEND = "sendgrid_backend.SendgridBackend"
SENDGRID_API_KEY = os.getenv("SENDGRID_API_KEY")
SENDGRID_SANDBOX_MODE_IN_DEBUG = False
SENDGRID_ECHO_TO_STDOUT = True

And in INSTALLED_APPS the entry for 'core' has to be changed to 'core.apps.CoreConfig' so that signal handling works well.

A solution for #5 (closed) can build on the environment variable loading implemented here to move all secrets out of settings.py into .env. When that is done, the above blocks can be added to settings.py and committed to the remote.

Closes #13

Edited Oct 21, 2020 by mfonism
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 13-notify-admin-of-pending-lobby-requests