Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3361860
D11209.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
633 B
Referenced Files
None
Subscribers
None
D11209.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
@@ -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
Details
Attached
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)
Attached To
Mode
D11209: [lib] Update `threadHasAdminRole` to consider `specialField`
Attached
Detach File
Event Timeline
Log In to Comment