mirror of
https://github.com/outline/outline.git
synced 2025-12-30 15:30:12 -06:00
* Add TeamPreference to prevent document embedding - Add PreventDocumentEmbedding enum value to TeamPreference - Add default value (false) to maintain backward compatibility - Update TeamPreferences interface with new boolean property - Modify renderShare function to respect team preference - When preference is true, X-Frame-Options header is kept to prevent iframe embedding - When preference is false (default), X-Frame-Options is removed to allow embedding * Add preventDocumentEmbedding to TeamsUpdateSchema - Add preventDocumentEmbedding boolean field to the preferences object in TeamsUpdateSchema - This allows the new TeamPreference to be modified through the API - The existing teamUpdater function will automatically handle the new preference - API responses will include the preference via the presentTeam function --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import {
|
|
TOCPosition,
|
|
TeamPreference,
|
|
TeamPreferences,
|
|
UserPreference,
|
|
UserPreferences,
|
|
} from "./types";
|
|
|
|
export const MAX_AVATAR_DISPLAY = 6;
|
|
|
|
export const Pagination = {
|
|
defaultLimit: 25,
|
|
defaultOffset: 0,
|
|
maxLimit: 100,
|
|
sidebarLimit: 10,
|
|
};
|
|
|
|
export const CSRF = {
|
|
cookieName: "csrfToken",
|
|
headerName: "x-csrf-token",
|
|
fieldName: "_csrf",
|
|
};
|
|
|
|
export const TeamPreferenceDefaults: TeamPreferences = {
|
|
[TeamPreference.SeamlessEdit]: true,
|
|
[TeamPreference.ViewersCanExport]: true,
|
|
[TeamPreference.MembersCanInvite]: false,
|
|
[TeamPreference.MembersCanCreateApiKey]: true,
|
|
[TeamPreference.MembersCanDeleteAccount]: true,
|
|
[TeamPreference.PreviewsInEmails]: true,
|
|
[TeamPreference.PublicBranding]: false,
|
|
[TeamPreference.Commenting]: true,
|
|
[TeamPreference.CustomTheme]: undefined,
|
|
[TeamPreference.TocPosition]: TOCPosition.Left,
|
|
[TeamPreference.PreventDocumentEmbedding]: false,
|
|
};
|
|
|
|
export const UserPreferenceDefaults: UserPreferences = {
|
|
[UserPreference.RememberLastPath]: true,
|
|
[UserPreference.UseCursorPointer]: true,
|
|
[UserPreference.CodeBlockLineNumers]: true,
|
|
[UserPreference.SortCommentsByOrderInDocument]: true,
|
|
[UserPreference.EnableSmartText]: true,
|
|
};
|