Skip to content

Commit 0918214

Browse files
milanmajchrakclaude
andcommitted
UoE/datashare: trim verbose code comments
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f54a618 commit 0918214

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

src/app/core/data/item-data.service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,16 +273,14 @@ export abstract class BaseItemDataService extends IdentifiableDataService<Item>
273273
* Get the endpoint to move the item
274274
* @param itemId
275275
* @param inheritPolicies whether to inherit the destination collection's default policies
276-
* @param keepEmbargoPolicies when inheriting, whether to keep an existing embargo (only the
277-
* non-embargo access is inherited) instead of letting the inherited
278-
* default read access lift it
276+
* @param keepEmbargoPolicies when inheriting, keep an existing embargo instead of letting it be lifted
279277
*/
280278
public getMoveItemEndpoint(itemId: string, inheritPolicies: boolean, keepEmbargoPolicies = true): Observable<string> {
281279
return this.halService.getEndpoint(this.linkPath).pipe(
282280
map((endpoint: string) => this.getIDHref(endpoint, itemId)),
283281
map((endpoint: string) => {
284282
let href = `${endpoint}/owningCollection?inheritPolicies=${inheritPolicies}`;
285-
// keepEmbargoPolicies only affects the move when policies are inherited, so only send it then.
283+
// Only relevant when inheriting.
286284
if (inheritPolicies) {
287285
href += `&keepEmbargoPolicies=${keepEmbargoPolicies}`;
288286
}

src/app/item-page/edit-item-page/item-move/item-move.component.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ export class ItemMoveComponent implements OnInit {
7474

7575
inheritPolicies = false;
7676

77-
/**
78-
* When inheriting the destination collection's policies, whether to keep an existing embargo
79-
* (only the non-embargo access is inherited) instead of letting the inherited default read
80-
* access lift it. Only relevant while {@link inheritPolicies} is enabled.
81-
*/
77+
/** When inheriting, keep an existing embargo instead of letting the inherited default read lift it. */
8278
keepEmbargoPolicies = true;
8379
itemRD$: Observable<RemoteData<Item>>;
8480
originalCollection: Collection;
@@ -152,8 +148,6 @@ export class ItemMoveComponent implements OnInit {
152148
*/
153149
moveToCollection() {
154150
this.processing = true;
155-
// keepEmbargoPolicies is only sent (and only matters) when inheriting; getMoveItemEndpoint omits
156-
// it otherwise, so we can pass it straight through.
157151
const move$ = this.itemDataService.moveToCollection(
158152
this.item.id, this.selectedCollection, this.inheritPolicies, this.keepEmbargoPolicies,
159153
).pipe(getFirstCompletedRemoteData());

0 commit comments

Comments
 (0)