Skip to content

FilterLists: add admin UI to enable/disable/edit entries and add additional entries#1735

Open
glaubinix wants to merge 16 commits into
composer:mainfrom
glaubinix:push-ytotnyomtkpn
Open

FilterLists: add admin UI to enable/disable/edit entries and add additional entries#1735
glaubinix wants to merge 16 commits into
composer:mainfrom
glaubinix:push-ytotnyomtkpn

Conversation

@glaubinix

@glaubinix glaubinix commented May 22, 2026

Copy link
Copy Markdown
Contributor

This PR requires DB migrations

Before deploy

  ALTER TABLE filter_list_entry
      ADD COLUMN disabled TINYINT(1) NOT NULL DEFAULT 0,
      ADD COLUMN overwriteVersion VARCHAR(255) DEFAULT NULL,
     ADD COLUMN internalNote LONGTEXT DEFAULT NULL;

// Avoid UNIQUE INDEX list_package_version_source_idx (`list`, `packageName`, `version`, `source`);
ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes
ALTER TABLE filter_list_entry
      MODIFY `list` VARCHAR(32) NOT NULL,
      MODIFY `source` VARCHAR(32) NOT NULL,
      DROP INDEX list_package_version_idx,
      ADD UNIQUE INDEX list_package_version_source_idx (`list`, `packageName`, `version`, `source`);

After deploy (sets publicId on all audit log entries which makes it possible to display matching entries on the edit view)

UPDATE audit_log a
INNER JOIN filter_list_entry fle
ON fle.packageName = JSON_UNQUOTE(JSON_EXTRACT(a.attributes, '$.entry.package_name'))
AND fle.list       = JSON_UNQUOTE(JSON_EXTRACT(a.attributes, '$.entry.list'))
AND fle.version    = JSON_UNQUOTE(JSON_EXTRACT(a.attributes, '$.entry.version'))
SET a.attributes = JSON_SET(a.attributes, '$.entry.public_id', fle.publicId)
WHERE a.type IN ('filter_list_entry_added', 'filter_list_entry_deleted')
AND JSON_EXTRACT(a.attributes, '$.entry.public_id') IS NULL;

Design decisions

  • Creating and modifying an entry triggers a redump of the package. However, the summary-url only gets dumped again during the next worker run

New filter list view

Shows all filter list entries with filters to better see what is going on. Disabled and overwritten entries are clearly marked in the UI.

Screenshot 2026-05-22 at 10 14 18

New filter list edit view

Currently only allows you to modify the version constraint. All other properties are only shown for informational purposes.
The view shows at the bottom all audit log entries for the entry

Screenshot 2026-05-22 at 10 16 41

Package filter list view changes

For admins there is now an edit link on the public page.

Screenshot 2026-05-22 at 10 17 30

Audit/transparency log changes

New entries are created for admin actions visible to everyone.

Screenshot 2026-05-22 at 10 19 15

@glaubinix glaubinix self-assigned this May 22, 2026
@glaubinix glaubinix force-pushed the push-ytotnyomtkpn branch from 3bca50d to 886a8c0 Compare May 22, 2026 09:29
@glaubinix glaubinix marked this pull request as ready for review May 22, 2026 14:59
@glaubinix glaubinix force-pushed the push-ytotnyomtkpn branch from 886a8c0 to 74872ea Compare June 5, 2026 07:51
@glaubinix glaubinix changed the title FilterLists: add admin UI to enable/disable/edit entries FilterLists: add admin UI to enable/disable/edit entries and add additional entries Jun 5, 2026
@glaubinix

Copy link
Copy Markdown
Contributor Author

Apply fixes from #1768

Comment thread src/Controller/AdminFilterListController.php Outdated
Comment thread src/Entity/FilterListEntry.php
Comment thread src/FilterList/FilterSources.php Outdated

@Seldaek Seldaek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly good to go, few nitpicks and needs a rebase

Comment thread src/Controller/AdminFilterListController.php Outdated
@glaubinix glaubinix force-pushed the push-ytotnyomtkpn branch from 07ff81e to 5cbe01d Compare July 2, 2026 20:54
@glaubinix

Copy link
Copy Markdown
Contributor Author

@Seldaek rebased and applied the fixes from #1768

@Seldaek Seldaek mentioned this pull request Jul 8, 2026
@Seldaek

Seldaek commented Jul 8, 2026

Copy link
Copy Markdown
Member

Sorry needs more rebase now :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants