[ocs share api] use error code 403 if sharing is not permitted

use error code 403 if sharing is not permitted

fix #6977