Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tests/caldav_test_servers.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,19 @@ test-servers:
enabled: ${TEST_CYRUS:-false}
host: ${CYRUS_HOST:-localhost}
port: ${CYRUS_PORT:-8802}
username: ${CYRUS_USERNAME:-testuser@test.local}
password: ${CYRUS_PASSWORD:-testpassword}
username: ${CYRUS_USERNAME:-user1}
password: ${CYRUS_PASSWORD:-x}
# Cyrus pre-creates user1-user5 (password 'x'), enabling scheduling tests.
# Use plain usernames (no domain): virtdomains is off in the test image.
scheduling_users:
- url: http://${CYRUS_HOST:-localhost}:${CYRUS_PORT:-8802}/dav/calendars/user/user1
username: user1@test.local
username: user1
password: x
- url: http://${CYRUS_HOST:-localhost}:${CYRUS_PORT:-8802}/dav/calendars/user/user2
username: user2@test.local
username: user2
password: x
- url: http://${CYRUS_HOST:-localhost}:${CYRUS_PORT:-8802}/dav/calendars/user/user3
username: user3@test.local
username: user3
password: x

sogo:
Expand Down
12 changes: 12 additions & 0 deletions tests/docker-test-servers/cyrus/setup_cyrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ for i in $(seq 1 $max_caldav_attempts); do
sleep 2
done

echo ""
echo "Granting scheduling ACL rights to pre-provisioned users..."
# Cyrus 3.13.x pre-creates user1's calendar home in the Docker image without
# the extended scheduling rights (7=schedule-send-invite, 8=schedule-send-reply,
# 9=schedule-send-freebusy). Dynamically-created calendar homes (user2+) get
# these rights automatically, so we only need to patch user1 here, but grant
# to all known pre-created users for safety.
for user in user1 user2 user3 user4 user5; do
printf 'sam user.%s.#calendars.Outbox %s lrswipkxtecdan789\r\n' "$user" "$user"
done | /usr/cyrus/bin/cyradm --auth PLAIN -u admin -w admin --notls --port 8143 localhost 2>/dev/null || \
echo "Warning: could not set scheduling ACL rights (cyradm failed)"

echo ""
echo "✓ Cyrus setup complete!"
echo ""
Expand Down
Loading