This repository was archived by the owner on Dec 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
Create new SlackUser Database with RESTful modifications #314
Copy link
Copy link
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_namefromUsertable - create new db table
SlackUsertable - implement BE exposing with customized authentication
- accept
createandupdatethrough 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_joinevent triggers some action to the BE with the slack user information- BE finds connected
Userrecord and creates a newSlackUserrecord - 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_changeevent triggers call to BE repo with information- BE report looks for
Slackuserwithslack_id, and makes change. - If no
SlackUserfound, creates newSlackUserand associates withUserwith matching email after_updatecallback 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