Issue Summary
When Public flag is enabled/disabled for a mirrored repository, it doesn't sync on corresponding mirrors.
Steps to Reproduce
- Setup BbS Mirror and approve it on upstream.
- Create a repository in some project, let's say Project A, and set Public flag as Enabled in Repository Permissions.
- Go to Settings > Mirrors
- Add project A on the mirror.
- Wait until clone dialog in the repository shows mirror in drop-down.
- Go to Repository Permissions and change the public flag to disabled.
- Try cloning the repository using mirror URL as anonymous user.
Expected Results
Clone should succeed only if you enter valid credentials.
Actual Results
Clone succeeds without asking for credentials.
Notes
Above behaviour is observed until full sync job runs on the mirror which runs periodically evert 15 minutes by default(configurable using property plugin.mirroring.synchronization.interval)
Workaround
- Wait for full sync to run
- Use REST service /upstreamServers/{upstreamId}/synchronization to trigger full sync manually.