Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3398616
D9975.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
744 B
Referenced Files
None
Subscribers
None
D9975.diff
View Options
diff --git a/keyserver/src/deleters/role-deleters.js b/keyserver/src/deleters/role-deleters.js
--- a/keyserver/src/deleters/role-deleters.js
+++ b/keyserver/src/deleters/role-deleters.js
@@ -1,5 +1,6 @@
// @flow
+import { specialRoles } from 'lib/permissions/special-roles.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import type {
RoleDeletionRequest,
@@ -45,9 +46,10 @@
const { community, roleID } = request;
const defaultRoleQuery = SQL`
- SELECT default_role
- FROM threads
- WHERE id = ${community}
+ SELECT id AS default_role
+ FROM roles
+ WHERE thread = ${community}
+ AND special_role = ${specialRoles.DEFAULT_ROLE}
`;
const membersWithRoleQuery = SQL`
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 11:40 PM (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609316
Default Alt Text
D9975.diff (744 B)
Attached To
Mode
D9975: [keyserver] Update usage of threads.default_role in role-deleters.js
Attached
Detach File
Event Timeline
Log In to Comment