Skip to content

Commit

Permalink
fix: ensure agencies is visible using passage auth
Browse files Browse the repository at this point in the history
  • Loading branch information
as1729 committed Dec 15, 2023
1 parent 400b821 commit 27edbf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Routes = () => {
{/* <Set private unauthenticated="forbidden" hasRole="admin"> */}
{/* </Set> */}

<PrivateSet unauthenticated="login" wrap={ScaffoldLayout} title="Agencies" titleTo="agencies" roles="admin">
<PrivateSet unauthenticated="login" wrap={ScaffoldLayout} title="Agencies" titleTo="agencies">
<Route path="/agencies/{id:Int}/edit" page={AgencyEditAgencyPage} name="editAgency" />
<Route path="/agencies/{id:Int}" page={AgencyAgencyPage} name="agency" />
<Route path="/agencies/new" page={AgencyNewAgencyPage} name="newAgency" />
Expand Down
5 changes: 3 additions & 2 deletions web/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ const passageClient = {
const token = await passageUser.getAuthToken()
return token
},
getUserMetadata: () => {
getUserMetadata: async () => {
console.log('passageUser.userInfo()')
console.log(await passageUser.userInfo())
return passageUser.userInfo()
},
login: (event) => {
Expand Down Expand Up @@ -118,7 +119,7 @@ function createAuthImplementation(client: AuthClient) {
* "updated_at": "2016-05-15T19:53:12.368652374-07:00"
* }
*/
getUserMetadata: async () => client.getUserMetadata(),
getUserMetadata: async () => await client.getUserMetadata(),
}
}

Expand Down

0 comments on commit 27edbf8

Please sign in to comment.