mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-25 20:15:01 +03:00
feat(groups): assign host rules from client groups (#7064)
Host rules could only be given to clients one by one, so giving a set of customers their own endpoints meant editing every client. A client group can now carry host rules, chosen when the group is created, from its edit dialog or from a quick-assign action on the Groups page. A subscription resolves a client's hosts in this order: the client's own host rules, then the host rules of its group, then the inbound's default pool. A group whose bound rules are all disabled or excluded from the requested format renders nothing for that inbound instead of falling back to the default pool. Binding a rule to a group narrows what its members get; other clients still see that rule in the default pool. Group names are now matched case-insensitively. On upgrade, labels that differ only in case (VIP and vip) are merged into one group, the first by name order. Adds POST /panel/api/clients/groups/:name/hosts and an optional hostGroupIds on group create and rename.
This commit is contained in:
@@ -156,12 +156,12 @@ jobs:
|
||||
- name: PostgreSQL schema and migration tests
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/database -run '^(TestHostAutoMigrateCreatesColumns_Postgres|TestMigrate_Postgres|TestClientWeeklyRenewMigration_Postgres|TestMigrate_LegacyBooleanVerifyPeerCertByNameIsBlanked_Postgres|TestClientKeepAlivePostgresMigrationPreservesLegacyScalars|TestPostgresModelSettled_TracksSchemaPresence)$' -count=1 -v | tee /tmp/postgres-schema.log
|
||||
go test ./internal/database -run '^(TestHostAutoMigrateCreatesColumns_Postgres|TestMigrate_Postgres|TestClientWeeklyRenewMigration_Postgres|TestMigrate_LegacyBooleanVerifyPeerCertByNameIsBlanked_Postgres|TestClientKeepAlivePostgresMigrationPreservesLegacyScalars|TestPostgresModelSettled_TracksSchemaPresence|TestEnsureClientGroupRows_Postgres)$' -count=1 -v | tee /tmp/postgres-schema.log
|
||||
# All must pass. Counting, not SKIP-matching: renaming a test would
|
||||
# otherwise leave this step green while testing nothing.
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-schema.log || true)
|
||||
if [ "$passed" -lt 6 ]; then
|
||||
echo "expected at least 6 passing PostgreSQL schema tests, got $passed" >&2
|
||||
if [ "$passed" -lt 7 ]; then
|
||||
echo "expected at least 7 passing PostgreSQL schema tests, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user