Filter out user-specific refs in VisibleRefFilter

If we can extract an account ID from a ref, then that ref is visible
if and only if the extracted account ID matches the current user.

Change-Id: I6bde71ad4d26849a742d873808230b871c0820b1
This commit is contained in:
Dave Borowitz
2014-09-10 12:32:41 +02:00
parent 418936d725
commit abe0b927eb
3 changed files with 53 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ public class AccountTest {
assertRef(1, "refs/users/01/1");
assertRef(1, "refs/users/01/1-drafts");
assertRef(1, "refs/users/01/1-drafts/2");
assertRef(1, "refs/users/01/1/edit/2");
assertNotRef(null);
assertNotRef("");