mengw15 commented on code in PR #7760: URL: https://github.com/apache/texera/pull/7760#discussion_r3810633662
########## file-service/src/main/scala/org/apache/texera/service/resource/ManagedResource.scala: ########## @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.texera.service.resource + +import org.apache.texera.dao.jooq.generated.enums.PrivilegeEnum +import org.apache.texera.dao.jooq.generated.tables.Dataset.DATASET +import org.apache.texera.dao.jooq.generated.tables.DatasetUserAccess.DATASET_USER_ACCESS +import org.apache.texera.dao.jooq.generated.tables.records.{DatasetRecord, DatasetUserAccessRecord} +import org.jooq.{Record, Table, TableField} + +/** + * Describes one user-owned, name-scoped, shareable resource by the columns that carry its + * identity, ownership, and per-user grants. + * + * @param label how the resource is named in user-facing messages ("dataset", "model") + * @tparam R record type of the resource table + * @tparam A record type of the companion user-access table + */ +case class ManagedResource[R <: Record, A <: Record]( Review Comment: Thanks — `ResourceTables` reads better. The scaladoc above it is unchanged though, and that's where the over-claim actually sits: "one user-owned, name-scoped, shareable resource" covers workflow, project and computing unit too, but the descriptor needs owner, name and public flag as columns of the same table, which only datasets and models have. A line saying that would stop the next person from starting a descriptor they can't finish. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
