Page MenuHomePhabricator

D9975.diff
No OneTemporary

D9975.diff

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

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)

Event Timeline