Page MenuHomePhabricator

D11209.diff
No OneTemporary

D11209.diff

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
@@ -1113,6 +1113,18 @@
if (!threadInfo) {
return false;
}
+ let hasSpecialRoleFieldBeenEncountered = false;
+ for (const role of Object.values(threadInfo.roles)) {
+ if (role.specialRole === specialRoles.ADMIN_ROLE) {
+ return true;
+ }
+ if (role.specialRole !== undefined) {
+ hasSpecialRoleFieldBeenEncountered = true;
+ }
+ }
+ if (hasSpecialRoleFieldBeenEncountered) {
+ return false;
+ }
return !!_find({ name: 'Admins' })(threadInfo.roles);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 7:50 PM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580843
Default Alt Text
D11209.diff (633 B)

Event Timeline