Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/fetchers/thread-permission-fetchers.js
// @flow | // @flow | ||||
import { | import { | ||||
permissionLookup, | permissionLookup, | ||||
makePermissionsBlob, | makePermissionsBlob, | ||||
getRoleForPermissions, | getRoleForPermissions, | ||||
} from 'lib/permissions/thread-permissions.js'; | } from 'lib/permissions/thread-permissions.js'; | ||||
import { relationshipBlockedInEitherDirection } from 'lib/shared/relationship-utils.js'; | import { relationshipBlockedInEitherDirection } from 'lib/shared/relationship-utils.js'; | ||||
import { | import { | ||||
threadFrozenDueToBlock, | threadFrozenDueToBlock, | ||||
permissionsDisabledByBlock, | permissionsDisabledByBlock, | ||||
} from 'lib/shared/thread-utils.js'; | } from 'lib/shared/thread-utils.js'; | ||||
import { userRelationshipStatus } from 'lib/types/relationship-types.js'; | import { userRelationshipStatus } from 'lib/types/relationship-types.js'; | ||||
import type { | import type { | ||||
ThreadType, | |||||
ThreadPermission, | ThreadPermission, | ||||
ThreadPermissionsBlob, | ThreadPermissionsBlob, | ||||
ThreadRolePermissionsBlob, | ThreadRolePermissionsBlob, | ||||
} from 'lib/types/thread-types.js'; | } from 'lib/types/thread-permission-types.js'; | ||||
import type { ThreadType } from 'lib/types/thread-types-enum.js'; | |||||
import { fetchThreadInfos } from './thread-fetchers.js'; | import { fetchThreadInfos } from './thread-fetchers.js'; | ||||
import { fetchKnownUserInfos } from './user-fetchers.js'; | import { fetchKnownUserInfos } from './user-fetchers.js'; | ||||
import { dbQuery, SQL } from '../database/database.js'; | import { dbQuery, SQL } from '../database/database.js'; | ||||
import type { Viewer } from '../session/viewer.js'; | import type { Viewer } from '../session/viewer.js'; | ||||
// Note that it's risky to verify permissions by inspecting the blob directly. | // Note that it's risky to verify permissions by inspecting the blob directly. | ||||
// There are other factors that can override permissions in the permissions | // There are other factors that can override permissions in the permissions | ||||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |