code: def _get_roles_for_request(request, application):
          
          roles = application.get_roles_for_person(request.user)
  
          if common.is_admin(request):
              roles.add("is_admin")
              roles.add('is_authorised')
  
          return roles
docs: Check the authentication of the current user.