Fix a few bugs for multi-tenancy
Squashed commit of the following:

commit 2d7a7867df01abc2e347ee5b0af957275b367ac2
Author: zhengxie <xiez1989@gmail.com>
Date:   Wed May 28 15:48:30 2014 +0800

    Fix org virtual repos

commit 85c9981e7f1ac1f15dcc66eada0e482b05b91179
Author: zhengxie <xiez1989@gmail.com>
Date:   Tue May 27 16:45:32 2014 +0800

    Fix share permission editing in share admin

commit c35efec6f6db7157266537f6cf74b321fb386aab
Author: zhengxie <xiez1989@gmail.com>
Date:   Tue May 27 16:35:53 2014 +0800

    Fix listing Shared/Group repos

commit 3400118e5778f8840575f02ead560c7f1cb61a00
Author: zhengxie <xiez1989@gmail.com>
Date:   Tue May 27 15:05:17 2014 +0800

    Fix share/unshare repo to users

commit 4c663ca8767fe34d903ca3828695253eb50f36eb
Author: zhengxie <xiez1989@gmail.com>
Date:   Fri May 23 18:33:22 2014 +0800

    Fix share/unshare inner pub repos