OK, in that case, can you remove this?


On Tue, Nov 26, 2013 at 7:09 AM, ukanga <notifications@github.com> wrote:

> In api/views.py:
>
> > +                "count": 102,
> > +                "day_of_submission": "2013-11-19",
> > +            }
> > +        ]
> > +    """
> > +    permission_classes = [permissions.IsAuthenticatedOrReadOnly, ]
> > +    lookup_field = 'owner'
> > +    lookup_fields = ('owner', 'formid', 'dataid')
> > +    extra_lookup_fields = None
> > +    queryset = Instance.objects.all()
> > +
> > +    def _get_accessible_forms(self, owner=None):
> > +        xforms = []
> > +        # list public forms incase anonymous user
> > +        if self.request.user.is_anonymous():
> > +            xforms = XForm.public_forms().order_by('?')[:10]
>
> Looking at /data it returns a list of data urls you have access to e.g
>
>    {
>        "dhis2form": "https://formhub.org/api/v1/data/modilabs/4240",
>        "exp_one": "https://formhub.org/api/v1/data/modilabs/13789",
>        "userone": "https://formhub.org/api/v1/data/modilabs/10417",
>    }
>
> hence it gives you discoverability options of data. The api behaves the
> same way for most end points hence at the time it made sense to provide a
> list of publicly available forms for anon users. I would echo access to the
> api require an authenticated user hence there will be no need for this.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/onaio/onadata/pull/18/files#r7922342>
> .
>