Skip to content

Commit 71419f4

Browse files
Remove calls to update_from_pd
1 parent 903cc22 commit 71419f4

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

NOTES.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,37 @@ Other capability
2222
## Google Document Features
2323
# Technical Documentation
2424
# Technical Implementation
25+
## People Depot Replication with SSO
26+
People Depot data is replicated when user logs in.
27+
### User Profile
28+
1. User attempts to login using kb url.
29+
2. If user is configured for SSO
30+
- user is redirected to login
31+
- user logs in
32+
- Cognito calls kb callback with parameters necessary to derive token using Cognito algorithm. Token is stored in variable.
33+
- /sync is called which calls update_all_from_pd. This is configured using LOGIN_REDIRECT_URL
34+
3. If user is not configured for SSO
35+
- user is drected to kb login page
36+
- user logs in using local account
37+
- token is derived using local algorithm. Token is stored in variable.
38+
4. /sync url is called. This is configured in LOGIN_REDIRECT_URL
39+
5. sync url triggers call to update_all_from_pd
40+
6. update_all_from_pd
41+
6.1 calls update_practice_area_from_pd
42+
- gets practice area data from https://<people depot server>/practice-areas w
43+
- data returned is used to create and update practice area records
44+
6.2 calls update_user_profile_from_pd
45+
- gets current user data from https://<people depot server>/profile with token in header
46+
- data returned is used to create or update information for current user
47+
6.3 calls update_users_from_pd
48+
- gets current user data from https://<people depot server>/users with token in header
49+
- data returned is used to create or update groups and users
50+
###
51+
1. User attempts to login using kb url.
52+
2. gets token from https://<people depot server>/login that passes entered user and password
53+
3.
54+
55+
## People Depot without SSO
2556
## Servers
2657
- Javascript service for converting a Google doc into a markdown and placed in a location to be picked up by Jekyll Hack for LA website.
2758
- Django app to implement the Knowledge Base Features

django_root/data/migrations/0001_peopledepot_populate_user.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from django.db import migrations
2-
from people_depot.sync import update_users_from_pd
32

43

54
def run(__apps__, __schema_editor__):
65
pass
7-
# update_users_from_pd()
6+
# update_users_from_pd is called
87

98
class Migration(migrations.Migration):
109
initial = True

django_root/data/migrations/0002_peopledepot_populate_practice_area.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def update_from_json_file():
2020

2121
def run(__apps__, __schema_editor__):
2222
if PEOPLE_DEPOT_URL:
23-
update_practice_areas_from_pd()
23+
pass
24+
# update_practice_areas_from_pd()
2425
else:
2526
update_from_json_file
2627

django_root/kb/apps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
class kb_appConfig(AppConfig):
55
default_auto_field = "django.db.models.BigAutoField"
66
name = "kb"
7+
8+

0 commit comments

Comments
 (0)