Merge branch '16111-ssh-help' refs #16111
[arvados-workbench2.git] / src / models / user.ts
index b0f004c31e2ad4d450628b3c96c59d7ff27d3545..87a97dfcd1934b057369cee39bcfb82f389c05e0 100644 (file)
@@ -4,39 +4,34 @@
 
 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}` : "";
 };
 
-export interface UserResource extends Resource {
+export interface UserResource extends Resource, User {
     kind: ResourceKind.USER;
-    email: string;
-    username: string;
-    firstName: string;
-    lastName: string;
-    identityUrl: string;
-    isAdmin: boolean;
-    prefs: UserPrefs;
     defaultOwnerUuid: string;
-    isActive: boolean;
     writableBy: string[];
 }
-
-export interface UserPrefs {
-    profile: {
-        lab: string;
-        organization: string;
-        organizationEmail: string;
-        role: string;
-        websiteUrl: string;
-    };
-}
\ No newline at end of file