This repository was archived by the owner on Dec 3, 2019. It is now read-only.
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
Create new SlackUser Database with RESTful modifications #314
Closed
Description
Feature
Why is this feature being added?
This feature is being added to reduce User
table bloat and reduce manual CRUD operations.
This modification will create a new table to store Operation Code Slack information and create an endpoint to control the update and secure access for this RESTful endpoint.
Going to be using this issue as the epic for the entire feature, and will attempt to implement as I can.
What should your feature do?
- create migration to remove
slack_name
fromUser
table - create new db table
SlackUser
table - implement BE exposing with customized authentication
- accept
create
andupdate
through BE - submit conditional responses to the connected API
- rake task for initial seeding and downtime management
SlackUser Table
key | attribute | example |
---|---|---|
FK, unique | user_id | 20 |
unique | slack_id | "W012A3CDE" |
slack_name | "harry" | |
slack_real_name | "William Michael John" | |
slack_display_name | "Very Unoriginal" | |
unique | slack_email | "thebestwrestler@wwf.com" |
New User Flow
- User creates account through FE or uses previously made account
- User creates account in Slack
team_join
event triggers some action to the BE with the slack user information- BE finds connected
User
record and creates a newSlackUser
record - If no email found - > request user to set Slack email to be same as OC email.
- Notification to change can be a slack message, (preferred). Or an email.
Exisiting User updates
user_change
event triggers call to BE repo with information- BE report looks for
Slackuser
withslack_id
, and makes change. - If no
SlackUser
found, creates newSlackUser
and associates withUser
with matching email after_update
callback onuser.email_changed?
BE Endpoints
POST
:create
-> New User
a. success response
b. request email update response
c. some error statusPUT
:update
-> Existing User
a. success response
b. record created
c. request email update response
d. some error status
API Authentication
- Some TBD authentication
Metadata
Metadata
Assignees
Labels
No labels