def update_detail(self, object_list, bundle):
        if getattr(bundle.obj, 'pk', None):
            try:
                object_list.get(pk=bundle.obj.pk)

                for profile in bundle.obj.authors.all():
                    if bundle.request.user.pk == profile.user.pk:
                        return True
            except __HOLE__:
                pass

        # Fallback on the data sent.
        for profile in bundle.data['authors']:
            if hasattr(profile, 'keys'):
                if bundle.request.user.pk == profile['user'].get('id'):
                    return True
            else:
                # Ghetto.
                if bundle.request.user.pk == profile.strip('/').split('/')[-1]:
                    return True

        raise Unauthorized("Nope.")
dataset/ETHPy150Open django-tastypie/django-tastypie/tests/authorization/api/resources.py/PerUserAuthorization.update_detail