Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3349036
D8007.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8007.diff
View Options
diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js
--- a/keyserver/src/fetchers/thread-fetchers.js
+++ b/keyserver/src/fetchers/thread-fetchers.js
@@ -196,6 +196,9 @@
const codeVersionBelow213 = !hasMinCodeVersion(viewer.platformDetails, {
native: 213,
});
+ const codeVersionBelow221 = !hasMinCodeVersion(viewer.platformDetails, {
+ native: 221,
+ });
const threadInfos = {};
for (const threadID in serverResult.threadInfos) {
@@ -211,6 +214,7 @@
filterDetailedThreadEditPermissions: codeVersionBelow104,
filterThreadEditAvatarPermission: codeVersionBelow213,
excludePinInfo: codeVersionBelow209,
+ filterManageInviteLinksPermission: codeVersionBelow221,
},
);
if (threadInfo) {
diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -708,6 +708,7 @@
+filterDetailedThreadEditPermissions?: boolean,
+filterThreadEditAvatarPermission?: boolean,
+excludePinInfo?: boolean,
+ +filterManageInviteLinksPermission?: boolean,
};
function rawThreadInfoFromServerThreadInfo(
serverThreadInfo: ServerThreadInfo,
@@ -723,6 +724,8 @@
const filterThreadEditAvatarPermission =
options?.filterThreadEditAvatarPermission;
const excludePinInfo = options?.excludePinInfo;
+ const filterManageInviteLinksPermission =
+ options?.filterManageInviteLinksPermission;
const filterThreadPermissions = _omitBy(
(v, k) =>
@@ -742,7 +745,9 @@
threadPermissions.MANAGE_PINS,
threadPermissionPropagationPrefixes.DESCENDANT +
threadPermissions.MANAGE_PINS,
- ].includes(k)),
+ ].includes(k)) ||
+ (filterManageInviteLinksPermission &&
+ [threadPermissions.MANAGE_INVITE_LINKS].includes(k)),
);
const members = [];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 4:50 PM (19 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2571625
Default Alt Text
D8007.diff (1 KB)
Attached To
Mode
D8007: [keyserver] Filter `MANAGE_INVITE_LINKS` permission for `native` `codeVersions` < 221
Attached
Detach File
Event Timeline
Log In to Comment