def UserDnView(request, dn): logger.debug('looking for dn: %s' % dn) user_data = utils.get_auth_data(dn) if not user_data: return Response('User not found', status=status.HTTP_404_NOT_FOUND) # remove groups, since this doesn't come back in this HTTP endpoint in the # actual authorization service user_data.pop('groups', None) return Response(user_data, status=status.HTTP_200_OK)
def UserGroupsView(request, dn, project): user_data = {"groups": utils.get_auth_data(dn)['groups']} if not user_data: return Response('User not found', status=status.HTTP_404_NOT_FOUND) return Response(user_data, status=status.HTTP_200_OK)