[SSO-UI] Set new sso users as internal_view role users (#5824)

* use /user/list endpoint on admin ui

* sso insert user with role when user does not exist

* add sso sign in test

* linting fix

* rename self serve doc

* add doc for self serve flow

* test - sso sign in default values

* add test for /user/list endpoint
This commit is contained in:
Ishaan Jaff 2024-09-21 16:43:52 -07:00 committed by GitHub
parent a9caba33ef
commit d100b32573
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 404 additions and 102 deletions

View file

@ -215,10 +215,13 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
const fetchProxyAdminInfo = async () => {
if (accessToken != null) {
const combinedList: any[] = [];
const proxyViewers = await userGetAllUsersCall(
const response = await userGetAllUsersCall(
accessToken,
"proxy_admin_viewer"
);
console.log("proxy admin viewer response: ", response);
const proxyViewers: User[] = response["users"];
console.log(`proxy viewers response: ${proxyViewers}`);
proxyViewers.forEach((viewer: User) => {
combinedList.push({
user_role: viewer.user_role,
@ -229,11 +232,13 @@ const AdminPanel: React.FC<AdminPanelProps> = ({
console.log(`proxy viewers: ${proxyViewers}`);
const proxyAdmins = await userGetAllUsersCall(
const response2 = await userGetAllUsersCall(
accessToken,
"proxy_admin"
);
const proxyAdmins: User[] = response2["users"];
proxyAdmins.forEach((admins: User) => {
combinedList.push({
user_role: admins.user_role,