Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32223257
D11209.1765208149.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
633 B
Referenced Files
None
Subscribers
None
D11209.1765208149.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, Dec 8, 3:35 PM (8 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848865
Default Alt Text
D11209.1765208149.diff (633 B)
Attached To
Mode
D11209: [lib] Update `threadHasAdminRole` to consider `specialField`
Attached
Detach File
Event Timeline
Log In to Comment