Rest getter and setter functions needed in MM3

Bug #600962 reported by Anna SdG
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Mailman
Barry Warsaw

Bug Description

Below I'll list some functions we need implemented in the rest server to be able to implement them in the rest-client and use them for the UI. I don't think any of these are implemented yet but we'll need them.

  * A "getter" and a "setter" function for the user settings, i.e. a function returning the values the user had set for a particular mailing list and a function setting the new values the user has changed on the settings page for a mailing list.

  * A "getter" and a "setter" function for the admin settings for each list. Since there are many settings possible for each list, we may want to divide these into groups and create a getter and setter for each group, but I'm not sure about this. Maybe it's possible to make something generic just changing the values the user has changed making the grouping unnecessary, I really don't know. I just brought it up for consideration.

I'll leave the functions necessary for the archives so far but likely we'll later need functions returning old emails grouped according to threads, dates etc. like old Mailman has.

Revision history for this message
Barry Warsaw (barry) wrote :

I've been thinking about this one. Perhaps we shouldn't have getters and setters for each individual attribute. I think the right way to do this is to use PATCH and PUT to make modifications to user and mailing list resources. IOW, you'll do a GET to access the current state of the mailing list, then a PATCH (for partial update) or a PUT (for full update) of that resource. Of course the server side will impose any restrictions or sanity checks.

This should be fairly easy to do, so I'll work on this one next.

Changed in mailman:
milestone: none → 3.0.0a6
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → High
status: New → Confirmed
Barry Warsaw (barry)
Changed in mailman:
status: Confirmed → In Progress
Revision history for this message
Barry Warsaw (barry) wrote :

Unfortunately, I've discovered that restish doesn't support PATCH. Due to the way restish uses WebOb, it does not appear possible to hack support for that in. I'll submit bug reports to both upstreams and continue to implement PUT. This means that you'll have to change the entire state of the mailing list resource every time you want to change more than one attribute.

However, I also think I can make it so you can change just one attribute at a time. This will be less efficient when you want to set multiple values, but it should still give you something workable for now.

Barry Warsaw (barry)
Changed in mailman:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers