Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3527934
D11289.id.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
D11289.id.diff
View Options
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
@@ -97,7 +97,6 @@
LegacyRawThreadInfo,
ClientLegacyRoleInfo,
ServerThreadInfo,
- ServerMemberInfo,
ClientNewThreadRequest,
NewThreadResult,
ChangeThreadSettingsPayload,
@@ -1070,21 +1069,6 @@
'Only visible to its members and admins of ancestor channels.',
};
-// Since we don't have access to all of the ancestor ThreadInfos, we approximate
-// "parent admin" as anybody with CHANGE_ROLE permissions.
-function memberHasAdminPowers(
- memberInfo:
- | RelativeMemberInfo
- | LegacyMemberInfo
- | MemberInfo
- | ServerMemberInfo,
-): boolean {
- if (memberInfo.minimallyEncoded) {
- return hasPermission(memberInfo.permissions, threadPermissions.CHANGE_ROLE);
- }
- return !!memberInfo.permissions[threadPermissions.CHANGE_ROLE]?.value;
-}
-
function roleIsDefaultRole(
roleInfo: ?ClientLegacyRoleInfo | ?RoleInfo,
): boolean {
@@ -1881,7 +1865,6 @@
threadUIName,
threadInfoFromRawThreadInfo,
threadTypeDescriptions,
- memberHasAdminPowers,
roleIsDefaultRole,
roleIsAdminRole,
threadHasAdminRole,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 7:32 AM (7 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2701934
Default Alt Text
D11289.id.diff (1 KB)
Attached To
Mode
D11289: [lib] Delete `memberHasAdminPowers`
Attached
Detach File
Event Timeline
Log In to Comment