Explain why permission check occurs before existence check

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240355450
This commit is contained in:
mcilwain
2019-03-29 16:09:32 -04:00
committed by jianglai
parent 648656e002
commit e1abef7b3e
@@ -220,6 +220,8 @@ public class AuthenticatedRegistrarAccessor {
* @param clientId ID of the registrar we request
*/
public Registrar getRegistrar(String clientId) throws RegistrarAccessDeniedException {
// Verify access before checking if the registrar exists, in order to not leak information
// about objects in the system the user doesn't have permissions on.
verifyAccess(clientId);
Registrar registrar =