Sign-in look: the logo follows IAWL's rules; no plate by default; the brand fields are admin-only
Bitmaps only (JPEG, PNG, WebP, AVIF, GIF; SVG with svgLogo: true), the file fetched and checked by its bytes before it is printed (checkLogo; 512 KB; ten-minute memory; an unreachable address is believed), served from a generated size at least twice the shown width. logoPlate replaces logoMadeFor: no plate unless asked. With the look on, the name, logo and icon of Site settings are changed by admins only (brandAccess: 'editor' gives them back). Docs, skills, changelog draft, tests and pictures follow. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
3ceeab8469
commit
939ab679c7
+5
-3
@@ -773,9 +773,11 @@ export const iapl = (options: IaplOptions): Plugin => {
|
||||
: pluginGlobals
|
||||
// The project's globalOverrides win (access, admin, hooks merged; a function = full control).
|
||||
config.globals = [...(config.globals ?? []), ...applyGlobalOverrides(withRevalidate, options.globalOverrides)]
|
||||
// `whiteLabel.brandAccess: 'admin'`: the brand the sign-in screens show is changed by admins only.
|
||||
if (options.whiteLabel && options.whiteLabel !== true && options.whiteLabel.brandAccess === 'admin') {
|
||||
const wl = options.whiteLabel
|
||||
// The brand the sign-in screens show (name, logo, icon) is changed by admins only — with the sign-in look,
|
||||
// unless the project says `brandAccess: 'editor'`; without the look only when it says `'admin'`.
|
||||
const brandWl = options.whiteLabel === true ? {} : options.whiteLabel
|
||||
if (brandWl && (brandWl.brandAccess === 'admin' || (brandWl.brandAccess !== 'editor' && resolveSignInLook(brandWl)))) {
|
||||
const wl = brandWl
|
||||
config.globals = lockBrandFields(config.globals, wl.settingsSlug ?? 'site-settings', [wl.nameField ?? 'siteName', wl.logoField ?? 'logo', wl.iconField ?? 'favicon'])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user