zooniverse / panoptes

Zooniverse API to support user defined volunteer research projects
Apache License 2.0
103 stars 41 forks source link

User's projects list returns all projects #320

Closed brian-c closed 9 years ago

brian-c commented 9 years ago

Looks like requesting my user's projects (via the link /projects?user_id={users.id}) actually returns a list of all the projects that exist. This is not a special admin account account or anything.

brian-c commented 9 years ago

I mean projects, not subjects! Sorry.

edpaget commented 9 years ago

@brian-c it looks like @camallen added support for filtering by the owning user's login or the owning user_group's name. /projects?owner=edpaget or /projects?owner=mr_pagets_fourth_grade for example.

We believed that would be the cannonical way to search for projects since it doesn't require the client to know the owner type when searching.

I know that isn't what the link relation is returning due to RestPack's limitations, but I'll work on making it into:

{
    "links": {
          "user.projects": {
               "type": "projects",
               "href": "/projects?owner={user.login}"
           }
    }
}