Added code to the PatientAssignmentResource so that it can make use of the AuthorizationAdvice code. Refactored the AuthorizationAdvice before() method so that we have a generic way of checking access requests both within and outside of OpenMRS.