Skip to content

Configurable Publish Profiles in Starsky UI #2694

@qdraw

Description

@qdraw

Is your feature request related to a problem? Please describe.

Title

As a user, I want to publish photos only using explicitly allowed profiles, so I don’t accidentally deploy content using the wrong export configuration.


Description

Starsky currently supports multiple publish profiles that define how content is generated (images, HTML, manifests, etc.).
However, not all profiles are intended to publish content to a remote FTP destination.

To prevent accidental or unsafe publishing, publishing must be explicitly enabled per profile via configuration.
Only profiles marked as publishable may be used by the UI to trigger a publish operation.


Acceptance Criteria

Configuration

  • Each publish profile can declare whether it is allowed to publish.
  • Publishing is disabled by default unless explicitly enabled.
  • The _default profile is publishable by default (configurable).

UI Behavior

  • The Publish action only lists profiles that are marked as publishable.

  • Non-publishable profiles are:

    • Available for export
    • Hidden or disabled in the publish UI
  • The selected publish profile is clearly shown to the user before publishing.

Runtime Enforcement

  • Attempting to publish using a non-publishable profile results in an error.
  • The system must never call FtpService.Run() for a profile that is not publishable, even if triggered programmatically.

Technical Notes

Configuration Structure

  • Extend publishProfiles to include a profile-level publish capability flag:
"publishProfiles": {
    "_default": [
      {
        "contentType": "Html",
        "sourceMaxWidth": 100,
        "overlayMaxWidth": 100,
        "path": "warning: The field is not empty but for security reasons it is not shown",
        "folder": "",
        "append": "",
        "template": "Index.cshtml",
        "prepend": "",
        "metaData": true,
        "copy": true,
        "webpublish": true
      },
    "webpublish": true is new

Manifest Handling

  • The publish manifest must reference the selected publish profile.
  • Manifest loading remains the source of truth for publish settings.

Publishing Pipeline

  • Before invoking:
FtpService.Run(inputDirectory, slug, copy);
  • The system validates:

    • The profile exists
    • canPublish == true

Error Handling

  • If a profile without publish permission is used:

    • Abort the publish operation

    • Show a clear error message to the user:

      “This profile is not allowed to publish content.”


Definition of Done

  • Configuration supports publish enable/disable per profile
  • UI only allows publishing with publish-enabled profiles
  • Runtime validation prevents unauthorized publishing
  • Existing _default behavior preserved (configurable)
  • No breaking changes for export-only workflows

Non-Goals (Explicitly Out of Scope)

  • Adding new publish targets (FTP remains unchanged)
  • Modifying FtpService publish logic
  • CLI changes (optional future work)

Rationale (for future readers)

This story separates content generation from deployment intent, making publishing:

  • Explicit
  • Safer
  • Easier to reason about in both UI and configuration

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions