Commit Graph
55 Commits
Author SHA1 Message Date
robert dennis e467b4b5ff review fixes 2026-11-05 15:10:39 -05:00
robert dennis 7ac0f6c285 brand refactor 2026-11-05 14:23:59 -05:00
robert dennis a0a0bb99ab avatar actions 2026-10-20 15:55:48 -04:00
robert dennis f7aa208cab fix ci 2026-10-20 15:46:16 -04:00
Robert Dennis 282476cdb6 supported versions ci (#7285)
Runs CI against the versions and operating systems the install guide
supports.
2026-10-13 21:07:43 -04:00
robert dennis 836d4773ac theme setting tabs 2026-10-13 15:01:03 -04:00
robert dennis 72cd9dd5cc simplify theme backend 2026-10-12 21:24:43 -04:00
robert dennis ce2d78e839 theme inheritance 2026-10-12 19:13:44 -04:00
robert dennis 3bb514cefa layout views 2026-10-12 14:22:58 -04:00
robert dennis be99a0614b theme tests 2026-10-12 08:15:22 -04:00
subway 8e07ac97ab Fix a few API authorization gaps (#7273)
## Fixes
- An application key with only `users` write could create a root admin
or change an admin's password. Touching root admins now needs a key with
write on everything.
- An admin's account key could read node config (including the Wings
token) and create deploy tokens. Those admin endpoints now need a panel
session, and the application config endpoint no longer accepts account
keys. `wings configure` with an application key still works.

The email enumeration issue I originally had here is already covered by
#7259, so I dropped it.

Added tests for each. Full test suite, phpstan and pint pass. Checked
the node config page and auto-deploy in the admin UI still work.
2026-10-12 05:42:35 -04:00
robert dennis 870e00e1ca seed tags once 2026-10-12 05:18:59 -04:00
robert dennis cb9e2b4624 tag lookups 2026-10-12 05:18:59 -04:00
robert dennis cd564977cd admin tag checks 2026-10-12 05:18:59 -04:00
robert dennis 3ac8ecf098 seed egg tags 2026-10-12 05:18:59 -04:00
robert dennis 3287f12f29 admin resources: mounts and database hosts 2026-10-12 05:18:58 -04:00
robert dennis ff9d59ee98 password rule code 2026-10-12 05:18:57 -04:00
robert dennis 8810ae5a78 http exceptions 2026-10-12 05:18:57 -04:00
robert dennis 26463b47e4 account key activity 2026-10-12 05:18:56 -04:00
robert dennis 7fcaeae4d3 account activity 2026-10-12 05:18:56 -04:00
robert dennis 03b3e2252e user create activity 2026-10-12 05:18:56 -04:00
robert dennis d0d833ff2c backup activity 2026-10-12 05:18:56 -04:00
robert dennis 84695d2f0a database activity 2026-10-12 05:18:56 -04:00
robert dennis a84924539a server settings activity 2026-10-12 05:18:56 -04:00
robert dennis f8163159dd password rules 2026-10-12 05:18:56 -04:00
robert dennis 41dc05ec48 admin build rules 2026-10-12 05:18:56 -04:00
robert dennis aad1b0c387 activity rules 2026-10-12 05:18:56 -04:00
robert dennis 89d8cd8717 server startup action 2026-10-12 05:18:56 -04:00
robert dennis ac79b03483 server details action 2026-10-12 05:18:56 -04:00
robert dennis f4eee5e3f6 server build action 2026-10-12 05:18:56 -04:00
robert dennis b218339495 server create action 2026-10-12 05:18:56 -04:00
robert dennis 6cf48a6bb4 egg actions 2026-10-12 05:18:56 -04:00
robert dennis 735308cdd3 database actions 2026-10-12 05:18:56 -04:00
robert dennis 25ec34fad4 user actions 2026-10-12 05:18:55 -04:00
robert dennis c9eedab33f tag cleanup 2026-10-12 05:18:55 -04:00
robert dennis 4f742aa530 tag fixes 2026-10-12 05:18:55 -04:00
robert dennis 63ac50219c node tag kinds 2026-10-12 05:18:55 -04:00
robert dennis 68e78abc20 server node filter 2026-10-12 05:18:55 -04:00
robert dennis 1e79399c4b admin backup toggle 2026-10-12 05:18:55 -04:00
robert dennis b5430a32d3 bulk allocation delete 2026-10-12 05:18:55 -04:00
robert dennis d5b3f4fdce delete logging 2026-10-12 05:18:55 -04:00
robert dennis ab3f169141 docker image validation 2026-10-12 05:18:55 -04:00
robert dennis df428075c3 integer inputs 2026-10-12 05:18:54 -04:00
robert dennis feebc11056 boolean inputs 2026-10-12 05:18:54 -04:00
robert dennis cd5925da87 egg config round trip 2026-10-09 17:34:17 -04:00
Sky Mulley 5ce75cf50f fix bug introduced by security hardening that blocks mounts from being allocated onto server containers 2026-10-09 12:49:59 +01:00
Sky Mulleyandrobert dennis 71dd1911a5 Implement native support for hooking into forms with extensions (#7256)
## Problem

Extensions can render content before and after most admin pages, but not
inside the forms on them. The only exception was
`panel.users.detail.form`, and it could only re-render or validate the
user's existing fields. An extension had no way to add a field of its
own, because the Panel's save requests had nowhere to carry the value
and nothing loaded it back.

## Changes

### Slots inside every admin form

The create and edit forms for users, nodes, servers, eggs, locations,
mounts and database hosts each render a slot inside the form, such as
`panel.servers.create.form` and `panel.servers.detail.details.form`. The
slot receives the native `form`, the form's `kind` (`admin.server`), and
`mode` (`'create'` or `'edit'`). Edit slots also receive the saved
`resource`. Contributed `form.AppField` controls share the form's
validation, pending state and submit action.

### Extension-owned fields

An extension registers fields in its provider:

```php
$this->registerFormFields('admin.user', ['plan' => ['required', 'in:free,pro']]);

$this->registerFormFields(
    'admin.node',
    ['region' => ['required', 'string', 'max:32']],
    fn (Node $node): array => ['region' => NodeRegion::for($node)],
    fn (Node $node, array $values) => NodeRegion::store($node, $values['region']),
);
```

The 14 create and update endpoints accept an optional `extensions: {
[extensionId]: { [field]: value } }` body field. Each extension's rules
are applied as `extensions.{id}.{field}`, and only when the request
includes that extension's values. The extension's `save` callback runs
in the same database transaction as the core change, so a failure rolls
both back.

Server creation is the exception. Wings reads the new server while
provisioning it, so extension values are saved after provisioning
succeeds, outside the transaction.

For Node updates when Wings is unreachable. `UpdateNode` saves the node
and then throws `ConfigurationNotPersistedException` as a warning. The
node controller defers that exception until the extension values are
saved, so the node update is no longer rolled back.

`GET /api/admin/extensions/forms/{form}/{id}` returns every extension's
current values. It requires the resource's read permission. Edit pages
fetch it before rendering the form, but only when an extension has
registered fields for that form; the bootstrap payload now lists them
per extension in `forms`.

For users and servers the callbacks are optional, and values are stored
in the extension's scoped settings (`settings()->forUser($user)`,
`forServer($server)`). Values are limited to strings, numbers, booleans,
`null`, or lists of strings and numbers, which keeps the OpenAPI schema
and generated types concrete.

A `load` callback that throws, or returns an invalid value, is recorded
against the extension in the `form` phase. The frontend then hides that
extension's slot contributions on the edit page, so a save cannot
overwrite its stored values with defaults. Fields of a disabled or
failed extension are neither validated, saved nor loaded.

---------

Co-authored-by: robert dennis <31261583+robertdrakedennis@users.noreply.github.com>
2026-10-09 01:26:45 -04:00
robert dennis 56fb932a73 action cleanup 2026-10-08 17:40:00 -04:00
Sky Mulley dd81db5d4d implement ability to set icon for extensions 2026-10-07 10:46:54 +01:00
robert dennis 7db75f2e4a install handling cleanup 2026-10-06 20:11:59 -04:00