[arvados] updated: 2.7.0-6597-gf25b864885

git repository hosting git at public.arvados.org
Tue May 21 21:29:01 UTC 2024


Summary of changes:
 doc/admin/scoped-tokens.html.textile.liquid                |  1 -
 doc/admin/user-management-cli.html.textile.liquid          |  1 -
 doc/api/methods/users.html.textile.liquid                  |  1 -
 lib/controller/handler_test.go                             |  3 +--
 sdk/go/arvados/api_client_authorization.go                 |  1 -
 .../src/main/java/org/arvados/client/api/model/User.java   | 12 +-----------
 services/api/app/models/arvados_model.rb                   |  2 +-
 services/api/lib/current_api_client.rb                     |  9 ---------
 services/workbench2/src/models/api-client-authorization.ts |  3 +--
 services/workbench2/src/models/user.ts                     |  1 -
 .../workbench2/src/store/advanced-tab/advanced-tab.tsx     | 14 ++++++--------
 .../api-client-authorizations-dialog/attributes-dialog.tsx |  4 +---
 .../src/views-components/data-explorer/renderers.tsx       |  2 --
 .../api-client-authorization-panel-root.tsx                | 10 +---------
 14 files changed, 12 insertions(+), 52 deletions(-)

       via  f25b864885fe11bc993d5651ba047c786113f4df (commit)
       via  da93dc84c2129715e3cc7af07181de330a1a5999 (commit)
       via  6de69ae50be42cd1f68d51247b09b995079c0ef4 (commit)
      from  35779c1cc5e9666525432866b5e64eee9cb36a12 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f25b864885fe11bc993d5651ba047c786113f4df
Author: Tom Clegg <tom at curii.com>
Date:   Tue May 21 17:28:35 2024 -0400

    15397: Remove usage of default_owner_uuid.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 9ee2cca410..59dda72bfb 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -752,7 +752,7 @@ class ArvadosModel < ApplicationRecord
     current_time = db_current_time
     self.created_at ||= created_at_was || current_time
     self.updated_at = current_time
-    self.owner_uuid ||= current_default_owner if self.respond_to? :owner_uuid=
+    self.owner_uuid ||= current_user.uuid if current_user && self.respond_to? :owner_uuid=
     if !anonymous_updater
       self.modified_by_user_uuid = current_user ? current_user.uuid : nil
     end
diff --git a/services/api/lib/current_api_client.rb b/services/api/lib/current_api_client.rb
index 7c99c911f8..cb9182a1b7 100644
--- a/services/api/lib/current_api_client.rb
+++ b/services/api/lib/current_api_client.rb
@@ -19,15 +19,6 @@ module CurrentApiClient
     Thread.current[:api_url_base]
   end
 
-  def current_default_owner
-    # owner_uuid for newly created objects
-    ((current_api_client_authorization &&
-      current_api_client_authorization.default_owner_uuid) ||
-     (current_user && current_user.default_owner_uuid) ||
-     (current_user && current_user.uuid) ||
-     nil)
-  end
-
   # Where is the client connecting from?
   def current_api_client_ip_address
     Thread.current[:api_client_ip_address]

commit da93dc84c2129715e3cc7af07181de330a1a5999
Author: Tom Clegg <tom at curii.com>
Date:   Tue May 21 17:28:00 2024 -0400

    15397: Remove default_owner_uuid from SDKs and workbench.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/sdk/go/arvados/api_client_authorization.go b/sdk/go/arvados/api_client_authorization.go
index 8cae63ac8f..bd928f59b3 100644
--- a/sdk/go/arvados/api_client_authorization.go
+++ b/sdk/go/arvados/api_client_authorization.go
@@ -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"`
diff --git a/sdk/java-v2/src/main/java/org/arvados/client/api/model/User.java b/sdk/java-v2/src/main/java/org/arvados/client/api/model/User.java
index 5c86a07bdf..289dea4220 100644
--- a/sdk/java-v2/src/main/java/org/arvados/client/api/model/User.java
+++ b/sdk/java-v2/src/main/java/org/arvados/client/api/model/User.java
@@ -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() + ")";
     }
 }
diff --git a/services/workbench2/src/models/api-client-authorization.ts b/services/workbench2/src/models/api-client-authorization.ts
index c1f948a1e9..c8e25ca0ad 100644
--- a/services/workbench2/src/models/api-client-authorization.ts
+++ b/services/workbench2/src/models/api-client-authorization.ts
@@ -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}`;
diff --git a/services/workbench2/src/models/user.ts b/services/workbench2/src/models/user.ts
index 0df6eac241..d0f35b39eb 100644
--- a/services/workbench2/src/models/user.ts
+++ b/services/workbench2/src/models/user.ts
@@ -63,5 +63,4 @@ export const getUserClusterID = (user: User): string | undefined => {
 
 export interface UserResource extends Resource, User {
     kind: ResourceKind.USER;
-    defaultOwnerUuid: string;
 }
diff --git a/services/workbench2/src/store/advanced-tab/advanced-tab.tsx b/services/workbench2/src/store/advanced-tab/advanced-tab.tsx
index 3e0382825c..027cb17dc2 100644
--- a/services/workbench2/src/store/advanced-tab/advanced-tab.tsx
+++ b/services/workbench2/src/store/advanced-tab/advanced-tab.tsx
@@ -93,8 +93,8 @@ enum UserData {
 }
 
 enum ApiClientAuthorizationsData {
-    API_CLIENT_AUTHORIZATION = 'api_client_authorization',
-    DEFAULT_OWNER_UUID = 'default_owner_uuid'
+    API_CLIENT_AUTHORIZATION = 'api_client_authorization'
+    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>;
diff --git a/services/workbench2/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx b/services/workbench2/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
index de31f525eb..6e4c514de8 100644
--- a/services/workbench2/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
+++ b/services/workbench2/src/views-components/api-client-authorizations-dialog/attributes-dialog.tsx
@@ -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
+    );
diff --git a/services/workbench2/src/views-components/data-explorer/renderers.tsx b/services/workbench2/src/views-components/data-explorer/renderers.tsx
index 91b06c2b2f..4de2c22120 100644
--- a/services/workbench2/src/views-components/data-explorer/renderers.tsx
+++ b/services/workbench2/src/views-components/data-explorer/renderers.tsx
@@ -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);
diff --git a/services/workbench2/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx b/services/workbench2/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx
index 3d415744bf..98c9b2c013 100644
--- a/services/workbench2/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx
+++ b/services/workbench2/src/views/api-client-authorization-panel/api-client-authorization-panel-root.tsx
@@ -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,

commit 6de69ae50be42cd1f68d51247b09b995079c0ef4
Author: Tom Clegg <tom at curii.com>
Date:   Tue May 21 17:27:04 2024 -0400

    15397: Remove default_owner_uuid from docs/examples.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/doc/admin/scoped-tokens.html.textile.liquid b/doc/admin/scoped-tokens.html.textile.liquid
index 348e1661c4..6ae2f39490 100644
--- a/doc/admin/scoped-tokens.html.textile.liquid
+++ b/doc/admin/scoped-tokens.html.textile.liquid
@@ -57,7 +57,6 @@ A scoped token can be created at the command line:
  "api_client_id":7,
  "api_token":"5a74htnoqwkhtfo2upekpfbsg04hv7cy5v4nowf7dtpxer086m",
  "created_by_ip_address":null,
- "default_owner_uuid":null,
  "expires_at":null,
  "last_used_at":null,
  "last_used_by_ip_address":null,
diff --git a/doc/admin/user-management-cli.html.textile.liquid b/doc/admin/user-management-cli.html.textile.liquid
index ab179f00c5..a495d5ecf6 100644
--- a/doc/admin/user-management-cli.html.textile.liquid
+++ b/doc/admin/user-management-cli.html.textile.liquid
@@ -68,7 +68,6 @@ As an admin, you can create tokens for other users.
  "api_client_id":7,
  "api_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "created_by_ip_address":null,
- "default_owner_uuid":null,
  "expires_at":null,
  "last_used_at":null,
  "last_used_by_ip_address":null,
diff --git a/doc/api/methods/users.html.textile.liquid b/doc/api/methods/users.html.textile.liquid
index cd61bfa36b..9728240960 100644
--- a/doc/api/methods/users.html.textile.liquid
+++ b/doc/api/methods/users.html.textile.liquid
@@ -31,7 +31,6 @@ table(table table-bordered table-condensed).
 |identity_url|string|||
 |is_admin|boolean|||
 |prefs|hash|||
-|default_owner_uuid|string|||
 |is_active|boolean|||
 |writable_by|array|List of UUID strings identifying Groups and other Users that can modify this User object.  This will include the user's owner_uuid and, for administrators and users requesting their own User object, the requesting user's UUID.||
 
diff --git a/lib/controller/handler_test.go b/lib/controller/handler_test.go
index ff1d43da41..d5f644fdab 100644
--- a/lib/controller/handler_test.go
+++ b/lib/controller/handler_test.go
@@ -647,8 +647,7 @@ func (s *HandlerSuite) TestGetObjects(c *check.C) {
 			"api_client_authorization": {
 				"owner_uuid": "`+arvadostest.AdminUserUUID+`",
 				"created_by_ip_address": "::1",
-				"last_used_by_ip_address": "::1",
-				"default_owner_uuid": "`+arvadostest.AdminUserUUID+`"
+				"last_used_by_ip_address": "::1"
 			}
 		}`))
 	req.Header.Set("Authorization", "Bearer "+arvadostest.SystemRootToken)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list