Skip to content

Move all hard-coded usernames to api #39

@egillespie

Description

@egillespie

Is your feature request related to a problem? Please describe.

Right now if event organizers, Lansing Codes Tweeters, and other authorized users change, it requires code to be changed in this repository and perhaps to other projects such as www or api.

Having more than one source of truth for these people and requiring code changes followed by deployments to change authorized users can be tedious and difficult to troubleshoot.

Describe the solution you'd like

References to hard-coded usernames in this repository should instead look up the users from the api database. This would allow authorizations to be changed in realtime and without interruption to the slackbot.

Since this change will also require modifications to the api data model and supporting code, the first step is to create issues in the api project to migrate each user feature. Here is a list of places where usernames are hard-coded. Scripts that can be removed via #38 are not listed here.

  • lib/initializers/new-participant-notifier.ls
  • lib/initializers/troubleshooter.js
  • lib/initializers/tweeter.ls
  • lib/helpers/first-name-for.ls (there may be a way to look up first name from the user object in Slack so moving this to api may not be necessary)
  • lib/helpers/organizer-for.ls (this should be a one-to-many relationship from records in groups)

Additional context

With each issue created in api, please make sure to indicate the corresponding changes to be made in the slackbot repository so that both the api and slackbot features can be worked and resolved at the same time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions