mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 13:02:07 +03:00
refr(enso/cloud-v2#912): Rename SimpleUser.id
to SimpleUser.userSubject
(#9490)
This PR updates the model types for the request/response bodies to match the backend. These changes are for the (yet to be merged) changes to the `User` types: - https://github.com/enso-org/cloud-v2/pull/1075 Note that this PR must be **merged after the above PRs have been merged and deployed** to the backend. - Rename `SimpleUser::id` to `SimpleUser::userSubject` to match the backend # Important Notes On the backend, `SimpleUser.id` has been renamed to `SimpleUser.userSubject` for consistency. This commit updates the frontend to account for this change.
This commit is contained in:
parent
ecd56bbba8
commit
4ed970d9d1
@ -156,7 +156,7 @@ export default function ManagePermissionsModal<
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
pk: newUser.organizationId,
|
||||
sk: newUser.userId,
|
||||
user_subject: newUser.id,
|
||||
user_subject: newUser.userSubject,
|
||||
user_email: newUser.email,
|
||||
user_name: newUser.name,
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
@ -295,7 +295,7 @@ export default function ManagePermissionsModal<
|
||||
values={users}
|
||||
setValues={setUsers}
|
||||
items={allUsers}
|
||||
itemToKey={otherUser => otherUser.id}
|
||||
itemToKey={otherUser => otherUser.userSubject}
|
||||
itemToString={otherUser => `${otherUser.name} (${otherUser.email})`}
|
||||
matches={(otherUser, text) =>
|
||||
otherUser.email.toLowerCase().includes(text.toLowerCase()) ||
|
||||
|
@ -408,7 +408,7 @@ export interface OrganizationInfo {
|
||||
export interface SimpleUser {
|
||||
readonly organizationId: OrganizationId
|
||||
readonly userId: UserId
|
||||
readonly id: Subject
|
||||
readonly userSubject: Subject
|
||||
readonly name: string
|
||||
readonly email: EmailAddress
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ export function tryGetSingletonOwnerPermission(
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
pk: owner.id,
|
||||
sk: backend.UserId(''),
|
||||
user_subject: user?.id ?? backend.Subject(''),
|
||||
user_subject: user?.userSubject ?? backend.Subject(''),
|
||||
user_email: owner.email,
|
||||
user_name: owner.name,
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
Loading…
Reference in New Issue
Block a user