15397: Remove default_owner_uuid from SDKs and workbench.
authorTom Clegg <tom@curii.com>
Tue, 21 May 2024 21:28:00 +0000 (17:28 -0400)
committerTom Clegg <tom@curii.com>
Wed, 22 May 2024 21:29:07 +0000 (17:29 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

sdk/go/arvados/api_client_authorization.go
sdk/java-v2/src/main/java/org/arvados/client/api/model/User.java
services/workbench2/src/models/api-client-authorization.ts
services/workbench2/src/models/user.ts
services/workbench2/src/store/advanced-tab/advanced-tab.tsx
services/workbench2/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
services/workbench2/src/views-components/data-explorer/renderers.tsx
services/workbench2/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx

index 8cae63ac8f29678d6baef0e007d4c00fb3d79c3c..bd928f59b3bfdeb917333321c7bc81d71f94324f 100644 (file)
@@ -13,7 +13,6 @@ type APIClientAuthorization struct {
        APIToken             string    `json:"api_token"`
        CreatedAt            time.Time `json:"created_at"`
        CreatedByIPAddress   string    `json:"created_by_ip_address"`
-       DefaultOwnerUUID     string    `json:"default_owner_uuid"`
        Etag                 string    `json:"etag"`
        ExpiresAt            time.Time `json:"expires_at"`
        LastUsedAt           time.Time `json:"last_used_at"`
index 5c86a07bdf372d62a09a07aeca63f6a409e59e16..289dea422070be811ccbc11cc18854db7a15be36 100644 (file)
@@ -42,8 +42,6 @@ public class User extends Item {
     private Object prefs;
     @JsonProperty("writable_by")
     private List<String> writableBy;
-    @JsonProperty("default_owner_uuid")
-    private Boolean defaultOwnerUuid;
 
     public String getEmail() {
         return this.email;
@@ -89,10 +87,6 @@ public class User extends Item {
         return this.writableBy;
     }
 
-    public Boolean getDefaultOwnerUuid() {
-        return this.defaultOwnerUuid;
-    }
-
     public void setEmail(String email) {
         this.email = email;
     }
@@ -137,11 +131,7 @@ public class User extends Item {
         this.writableBy = writableBy;
     }
 
-    public void setDefaultOwnerUuid(Boolean defaultOwnerUuid) {
-        this.defaultOwnerUuid = defaultOwnerUuid;
-    }
-
     public String toString() {
-        return "User(email=" + this.getEmail() + ", username=" + this.getUsername() + ", fullName=" + this.getFullName() + ", firstName=" + this.getFirstName() + ", lastName=" + this.getLastName() + ", identityUrl=" + this.getIdentityUrl() + ", isActive=" + this.getIsActive() + ", isAdmin=" + this.getIsAdmin() + ", isInvited=" + this.getIsInvited() + ", prefs=" + this.getPrefs() + ", writableBy=" + this.getWritableBy() + ", defaultOwnerUuid=" + this.getDefaultOwnerUuid() + ")";
+        return "User(email=" + this.getEmail() + ", username=" + this.getUsername() + ", fullName=" + this.getFullName() + ", firstName=" + this.getFirstName() + ", lastName=" + this.getLastName() + ", identityUrl=" + this.getIdentityUrl() + ", isActive=" + this.getIsActive() + ", isAdmin=" + this.getIsAdmin() + ", isInvited=" + this.getIsInvited() + ", prefs=" + this.getPrefs() + ", writableBy=" + this.getWritableBy() + ")";
     }
 }
index c1f948a1e98e4142710a78d6b4d606e124597d4d..c8e25ca0ad3eca3b90c6a79f795421b51367b283 100644 (file)
@@ -16,9 +16,8 @@ export interface ApiClientAuthorization extends Resource {
     createdAt: string;
     updatedAt: string;
     ownerUuid: string;
-    defaultOwnerUuid: string;
     scopes: string[];
 }
 
 export const getTokenV2 = (aca: ApiClientAuthorization): string =>
-    `v2/${aca.uuid}/${aca.apiToken}`;
\ No newline at end of file
+    `v2/${aca.uuid}/${aca.apiToken}`;
index 0df6eac24158809ce426560359bab96b0985fe1c..d0f35b39eb6aaebb73a89c54c557e67552fa8de7 100644 (file)
@@ -63,5 +63,4 @@ export const getUserClusterID = (user: User): string | undefined => {
 
 export interface UserResource extends Resource, User {
     kind: ResourceKind.USER;
-    defaultOwnerUuid: string;
 }
index 3e0382825cfa918306da9cdfbc5e93e9c24ce3ea..ee2cb12443a8cad71dce9d6f39e9e0b3fc7e535f 100644 (file)
@@ -94,7 +94,7 @@ enum UserData {
 
 enum ApiClientAuthorizationsData {
     API_CLIENT_AUTHORIZATION = 'api_client_authorization',
-    DEFAULT_OWNER_UUID = 'default_owner_uuid'
+    EXPIRES_AT = 'expires_at'
 }
 
 enum LinkData {
@@ -252,8 +252,8 @@ export const openAdvancedTabDialog = (uuid: string) =>
                     data: dataApiClientAuthorization,
                     resourceKind: ApiClientAuthorizationsData.API_CLIENT_AUTHORIZATION,
                     resourcePrefix: ResourcePrefix.API_CLIENT_AUTHORIZATIONS,
-                    resourceKindProperty: ApiClientAuthorizationsData.DEFAULT_OWNER_UUID,
-                    property: dataApiClientAuthorization!.defaultOwnerUuid
+                    resourceKindProperty: ApiClientAuthorizationsData.EXPIRES_AT,
+                    property: dataApiClientAuthorization!.createdAt
                 });
                 dispatch<any>(initAdvancedTabDialog(advanceDataApiClientAuthorization));
                 break;
@@ -559,7 +559,7 @@ const keepServiceApiResponse = (apiResponse: KeepServiceResource): JSX.Element =
 const userApiResponse = (apiResponse: UserResource): JSX.Element => {
     const {
         uuid, ownerUuid, createdAt, modifiedAt, modifiedByClientUuid, modifiedByUserUuid,
-        email, firstName, lastName, username, isActive, isAdmin, prefs, defaultOwnerUuid,
+        email, firstName, lastName, username, isActive, isAdmin, prefs,
     } = apiResponse;
     const response = `
 "uuid": "${uuid}",
@@ -575,7 +575,6 @@ const userApiResponse = (apiResponse: UserResource): JSX.Element => {
 "is_active": "${isActive},
 "is_admin": "${isAdmin},
 "prefs": "${stringifyObject(prefs)},
-"default_owner_uuid": "${defaultOwnerUuid},
 "username": "${username}"`;
 
     return <span style={{ marginLeft: '-15px' }}>{'{'} {response} {'\n'} <span style={{ marginLeft: '-15px' }}>{'}'}</span></span>;
@@ -584,7 +583,7 @@ const userApiResponse = (apiResponse: UserResource): JSX.Element => {
 const apiClientAuthorizationApiResponse = (apiResponse: ApiClientAuthorization): JSX.Element => {
     const {
         uuid, ownerUuid, apiToken, apiClientId, userId, createdByIpAddress, lastUsedByIpAddress,
-        lastUsedAt, expiresAt, defaultOwnerUuid, scopes, updatedAt, createdAt
+        lastUsedAt, expiresAt, scopes, updatedAt, createdAt
     } = apiResponse;
     const response = `
 "uuid": "${uuid}",
@@ -597,7 +596,6 @@ const apiClientAuthorizationApiResponse = (apiResponse: ApiClientAuthorization):
 "expires_at": "${stringify(expiresAt)}",
 "created_at": "${stringify(createdAt)}",
 "updated_at": "${stringify(updatedAt)}",
-"default_owner_uuid": "${stringify(defaultOwnerUuid)}",
 "scopes": "${JSON.stringify(scopes, null, 2)}"`;
 
     return <span style={{ marginLeft: '-15px' }}>{'{'} {response} {'\n'} <span style={{ marginLeft: '-15px' }}>{'}'}</span></span>;
index de31f525eb2713078de4958571ee0217f0f8400d..6e4c514de858864b57fdcdf49d8cef6614ff1893 100644 (file)
@@ -48,8 +48,6 @@ export const AttributesApiClientAuthorizationDialog = compose(
                         <Grid item xs={7}>{data.apiClientAuthorization.apiToken}</Grid>
                         <Grid item xs={5}>Created by IP address</Grid>
                         <Grid item xs={7}>{data.apiClientAuthorization.createdByIpAddress || '(none)'}</Grid>
-                        <Grid item xs={5}>Default owner</Grid>
-                        <Grid item xs={7}>{data.apiClientAuthorization.defaultOwnerUuid || '(none)'}</Grid>
                         <Grid item xs={5}>Expires at</Grid>
                         <Grid item xs={7}>{formatDate(data.apiClientAuthorization.expiresAt) || '(none)'}</Grid>
                         <Grid item xs={5}>Last used at</Grid>
@@ -75,4 +73,4 @@ export const AttributesApiClientAuthorizationDialog = compose(
                     </Button>
                 </DialogActions>
             </Dialog>
-    );
\ No newline at end of file
+    );
index 91b06c2b2f0a9e22d0d407422d4c2b0fc4636729..4de2c22120f686887921f513a7605f41394a70ee 100644 (file)
@@ -449,8 +449,6 @@ export const TokenApiToken = withResourceData("apiToken", renderCommonData);
 
 export const TokenCreatedByIpAddress = withResourceData("createdByIpAddress", renderCommonDate);
 
-export const TokenDefaultOwnerUuid = withResourceData("defaultOwnerUuid", renderCommonData);
-
 export const TokenExpiresAt = withResourceData("expiresAt", renderCommonDate);
 
 export const TokenLastUsedAt = withResourceData("lastUsedAt", renderCommonDate);
index 3d415744bfe7afeea95f2b9af903d97a6f2f038c..98c9b2c013c8ec7dbd42e47a52451168e0675c39 100644 (file)
@@ -15,7 +15,7 @@ import { API_CLIENT_AUTHORIZATION_PANEL_ID } from '../../store/api-client-author
 import { DataExplorer } from 'views-components/data-explorer/data-explorer';
 import { ResourcesState } from 'store/resources/resources';
 import {
-    CommonUuid, TokenApiClientId, TokenApiToken, TokenCreatedByIpAddress, TokenDefaultOwnerUuid, TokenExpiresAt,
+    CommonUuid, TokenApiClientId, TokenApiToken, TokenCreatedByIpAddress, TokenExpiresAt,
     TokenLastUsedAt, TokenLastUsedByIpAddress, TokenScopes, TokenUserId
 } from 'views-components/data-explorer/renderers';
 import { ApiClientAuthorization } from 'models/api-client-authorization';
@@ -34,7 +34,6 @@ export enum ApiClientAuthorizationPanelColumnNames {
     API_CLIENT_ID = 'API Client ID',
     API_TOKEN = 'API Token',
     CREATED_BY_IP_ADDRESS = 'Created by IP address',
-    DEFAULT_OWNER_UUID = 'Default owner',
     EXPIRES_AT = 'Expires at',
     LAST_USED_AT = 'Last used at',
     LAST_USED_BY_IP_ADDRESS = 'Last used by IP address',
@@ -72,13 +71,6 @@ export const apiClientAuthorizationPanelColumns: DataColumns<string, ApiClientAu
         filters: createTree(),
         render: uuid => <TokenCreatedByIpAddress uuid={uuid} />
     },
-    {
-        name: ApiClientAuthorizationPanelColumnNames.DEFAULT_OWNER_UUID,
-        selected: true,
-        configurable: true,
-        filters: createTree(),
-        render: uuid => <TokenDefaultOwnerUuid uuid={uuid} />
-    },
     {
         name: ApiClientAuthorizationPanelColumnNames.EXPIRES_AT,
         selected: true,