Skip to content

Commit 8c63f2f

Browse files
author
MargeBot
committed
Merge branch 'followup-signature-icon-sdk' into 'main'
Ignore check of anonymous for signatureIssues See merge request web/clients!19037
2 parents 5f1e20d + 4e88f5e commit 8c63f2f

File tree

9 files changed

+185
-360
lines changed

9 files changed

+185
-360
lines changed

applications/drive/src/app/modals/DetailsModal/useFileDetailsModalState.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const useFileDetailsModalState = ({ volumeId, linkId, ...modalProps }: Us
127127
}
128128
};
129129
void withLoading(fetchFileDetails());
130-
}, [volumeId, linkId, drive]);
130+
}, [volumeId, linkId, drive, withLoading, handleError]);
131131

132132
return {
133133
...modalProps,

applications/drive/src/app/sections/sharedWith/loaders/useSharedWithMeNodesLoader.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { splitNodeUid, useDrive } from '@proton/drive/index';
99
import useVolumesState from '../../../store/_volumes/useVolumesState';
1010
import { EnrichedError } from '../../../utils/errorHandling/EnrichedError';
1111
import { useSdkErrorHandler } from '../../../utils/errorHandling/useSdkErrorHandler';
12-
import { getIsAnonymousUser } from '../../../utils/sdk/getIsAnonymousUser';
1312
import { getNodeEntity } from '../../../utils/sdk/getNodeEntity';
1413
import { getSignatureIssues } from '../../../utils/sdk/getSignatureIssues';
1514
import { ItemType, useSharedWithMeListingStore } from '../../../zustand/sections/sharedWithMeListing.store';
@@ -43,7 +42,6 @@ export const useSharedWithMeNodesLoader = () => {
4342
try {
4443
const { node } = getNodeEntity(sharedWithMeMaybeNode);
4544
const signatureResult = getSignatureIssues(sharedWithMeMaybeNode);
46-
const isAnonymousUser = getIsAnonymousUser(sharedWithMeMaybeNode);
4745
if (!node.deprecatedShareId) {
4846
handleError(
4947
new EnrichedError('The shared with me node entity is missing deprecatedShareId', {
@@ -95,7 +93,7 @@ export const useSharedWithMeNodesLoader = () => {
9593
? node.membership.sharedBy.value
9694
: node.membership.sharedBy.error.claimedAuthor) || '',
9795
},
98-
haveSignatureIssues: !isAnonymousUser && !signatureResult.ok,
96+
haveSignatureIssues: !signatureResult.ok,
9997
shareId: node.deprecatedShareId,
10098
});
10199
} catch (e) {

applications/drive/src/app/sections/sharedby/loaders/useSharedByMeNodesLoader.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useDrive } from '@proton/drive';
77

88
import { EnrichedError } from '../../../utils/errorHandling/EnrichedError';
99
import { useSdkErrorHandler } from '../../../utils/errorHandling/useSdkErrorHandler';
10-
import { getIsAnonymousUser } from '../../../utils/sdk/getIsAnonymousUser';
1110
import { getNodeEntity } from '../../../utils/sdk/getNodeEntity';
1211
import { getNodeLocation } from '../../../utils/sdk/getNodeLocation';
1312
import { getSignatureIssues } from '../../../utils/sdk/getSignatureIssues';
@@ -34,7 +33,6 @@ export const useSharedByMeNodesLoader = () => {
3433
try {
3534
const { node } = getNodeEntity(sharedByMeMaybeNode);
3635
const signatureResult = getSignatureIssues(sharedByMeMaybeNode);
37-
const isAnonymousUser = getIsAnonymousUser(sharedByMeMaybeNode);
3836
if (!node.deprecatedShareId) {
3937
handleError(
4038
new EnrichedError('The shared with me node entity is missing deprecatedShareId', {
@@ -82,7 +80,7 @@ export const useSharedByMeNodesLoader = () => {
8280
mediaType: node.mediaType,
8381
thumbnailId: node.activeRevision?.uid || node.uid,
8482
shareId: node.deprecatedShareId,
85-
haveSignatureIssues: !isAnonymousUser && !signatureResult.ok,
83+
haveSignatureIssues: !signatureResult.ok,
8684
});
8785
} catch (e) {
8886
handleError(e, {

applications/drive/src/app/sections/sharedby/useSharedByMe.store.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { getActionEventManager } from '../../utils/ActionEventManager/ActionEven
88
import { ActionEventName } from '../../utils/ActionEventManager/ActionEventManagerTypes';
99
import { EnrichedError } from '../../utils/errorHandling/EnrichedError';
1010
import { handleSdkError } from '../../utils/errorHandling/useSdkErrorHandler';
11-
import { getIsAnonymousUser } from '../../utils/sdk/getIsAnonymousUser';
1211
import { getNodeEntity } from '../../utils/sdk/getNodeEntity';
1312
import { getNodeLocation } from '../../utils/sdk/getNodeLocation';
1413
import { getSignatureIssues } from '../../utils/sdk/getSignatureIssues';
@@ -202,7 +201,6 @@ export const useSharedByMeStore = create<SharedByMeStore>()(
202201
if (item.isShared && !getSharedByMeItem(item.uid)) {
203202
const sharedByMeMaybeNode = await drive.getNode(item.uid);
204203
const signatureResult = getSignatureIssues(sharedByMeMaybeNode);
205-
const isAnonymousUser = getIsAnonymousUser(sharedByMeMaybeNode);
206204
const { node } = getNodeEntity(sharedByMeMaybeNode);
207205
if (!node.deprecatedShareId) {
208206
handleSdkError(
@@ -237,7 +235,7 @@ export const useSharedByMeStore = create<SharedByMeStore>()(
237235
}
238236
: undefined,
239237
shareId: node.deprecatedShareId,
240-
haveSignatureIssues: !isAnonymousUser && !signatureResult.ok,
238+
haveSignatureIssues: !signatureResult.ok,
241239
});
242240
}
243241
} catch (error) {
@@ -255,7 +253,6 @@ export const useSharedByMeStore = create<SharedByMeStore>()(
255253
} else if (item.isTrashed) {
256254
const sharedByMeMaybeNode = await drive.getNode(item.uid);
257255
const signatureResult = getSignatureIssues(sharedByMeMaybeNode);
258-
const isAnonymousUser = getIsAnonymousUser(sharedByMeMaybeNode);
259256
const { node } = getNodeEntity(sharedByMeMaybeNode);
260257
if (!node.deprecatedShareId) {
261258
handleSdkError(
@@ -290,7 +287,7 @@ export const useSharedByMeStore = create<SharedByMeStore>()(
290287
}
291288
: undefined,
292289
shareId: node.deprecatedShareId,
293-
haveSignatureIssues: !isAnonymousUser && !signatureResult.ok,
290+
haveSignatureIssues: !signatureResult.ok,
294291
});
295292
}
296293
} catch (error) {

applications/drive/src/app/utils/sdk/getIsAnonymousUser.test.ts

Lines changed: 0 additions & 113 deletions
This file was deleted.

applications/drive/src/app/utils/sdk/getIsAnonymousUser.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)