SealSkin

branding

The brand as the pages read it and as an administrator sets it.

The pictures are public: the logo is the favicon of the sign-in page, which nobody is signed in to, and both are addressed by hash so a browser keeps them. The record itself is read by signed-in users (GET /api/branding), and written, with the pictures, by administrators under /api/admin/branding.

attributerouter
= APIRouter(prefix='/api/branding')
attributeuser_router
= APIRouter(prefix='/api/branding', route_class=EncryptedRoute)
attributeadmin_router
= APIRouter(prefix='/api/admin/branding', dependencies=[Depends(verify_admin), Depends(routing.announce_changes)], route_class=EncryptedRoute)
funcget_branding(user=Depends(verify_token)) -> BrandingView

Return the brand with its pictures.

paramuserdict[str, Any]
= Depends(verify_token)

Returns

app.models.BrandingView
funclogo() -> Response

Serve the uploaded logo.

Returns

fastapi.Response
funcwallpaper() -> Response

Serve the uploaded wallpaper.

Returns

fastapi.Response
funcwrite_branding(body=Depends(get_decrypted_request_body)) -> BrandingView

Replace the brand's record; the pictures stay.

parambodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.BrandingView
funcreset_branding() -> BrandingView

Remove the record and the pictures, back to the defaults.

Returns

app.models.BrandingView
funcupload_picture(kind, body=Depends(get_decrypted_request_body)) -> BrandingView

Keep an uploaded logo or wallpaper.

paramkindstr
parambodydict[str, Any]
= Depends(get_decrypted_request_body)

Returns

app.models.BrandingView
funcdelete_picture(kind) -> BrandingView

Remove the logo or the wallpaper.

paramkindstr

Returns

app.models.BrandingView