X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c16ef38920e9d011215a519bc58624a614717cd6..239ccc433d865ca165aac949cb66d7a03f86c721:/src/models/user.ts diff --git a/src/models/user.ts b/src/models/user.ts index 4cc29ba7..24978645 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -2,14 +2,43 @@ // // SPDX-License-Identifier: AGPL-3.0 +import { Resource, ResourceKind } from '~/models/resource'; + +export type UserPrefs = { + profile?: { + organization?: string, + organization_email?: string, + lab?: string, + website_url?: string, + role?: string + } +}; + export interface User { email: string; firstName: string; lastName: string; uuid: string; ownerUuid: string; + username: string; + prefs: UserPrefs; + isAdmin: boolean; + isActive: boolean; } export const getUserFullname = (user?: User) => { return user ? `${user.firstName} ${user.lastName}` : ""; -}; \ No newline at end of file +}; + +export interface UserResource extends Resource { + kind: ResourceKind.USER; + email: string; + username: string; + firstName: string; + lastName: string; + isAdmin: boolean; + prefs: UserPrefs; + defaultOwnerUuid: string; + isActive: boolean; + writableBy: string[]; +}