Lists can't add identical url twice (blocklist / allowlist)

Assume the following scenario:
Administrator wants to block twitter, using this list for all users (blocklist), but wants to ensure twitter is fully reachable for users in a specific group, by assigning the same list (allowlist) to a specific group (allow_twitter).
To ensure this works, the lists needs to be entered as blocklist ( -> gravity) and as allowlist (-> antigravity). Currently, you can't add both entries, see error.

See also the identical problem and solution in this FTL change.

I will be honest: I had to read your proposal twice but now I do agree. I also agree that the solution would be the same as in the PR you linked where it was allowed for domains on the domainlist table.

Please check if

pihole checkout core tweak/allow_adlist_dups

does what you expect it to do.

web interface problem: deleting one entry results in all both entries being removed

pihole -q when only allowlist exists:

pi@raspberrypi:~ $ pihole -q
Found 0 domains exactly matching ''.

Found 1 adlists exactly matching ''.



pihole -q when both allowlist and blocklist exist:

Found 0 domains exactly matching ''.

Found 1 adlists exactly matching ''.



the 'pihole -q' result doesn't indicate if the entry is on an allowlist or a blocklist:

This also extended to not being able to edit them correctly. Many more changes were necessary to implement this, please also check out the tweak/allow_adlist_dups branch on both FTL and web as well:

pihole checkout ftl tweak/allow_adlist_dups
pihole checkout web tweak/allow_adlist_dups

(FTL binaries still building...)

The API returns the correct result

but the frontend currently fails to interpret it correctly:
Screenshot from 2024-02-13 08-46-33

This is the next thing on my todo list.
edit Fixed and pushed:

sudo pihole -v
    Version is v5.17.3-285-g75fadb9b (Latest: null)
    Branch is tweak/allow_adlist_dups
    Hash is 75fadb9b (Latest: 75fadb9b)
    Version is v5.19-675-g2098a11a (Latest: null)
    Branch is tweak/allow_adlist_dups
    Hash is 2098a11a (Latest: 2098a11a)
    Version is vDev-7a919cb (Latest: null)
    Branch is tweak/allow_adlist_dups
    Hash is 7a919cbf (Latest: 7a919cbf)
  • deleting, using web interface -> SOLVED
  • web interface / tools / search lists -> SOLVED, output is very informative
  • pihole -q (command line) -> both lists are identified, but the type info (block list // allow list is missing).
pihole -q
Found 0 domains exactly matching ''.

Found 2 adlists exactly matching ''.





given the type (allow // block) can be retrieved, it should be possible to display this info on the command line (pihole -q)

thanks for your time and effort.