Refactor share repo, add quota check before share