Throw exceptions when permission is denied #2729

This allow to display the reason of the rejection to end-user via standard
exception management on client-side.