[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reject or accept non-draft entries in Wordpress




In the Lotus Connections blogs implementation, when an author with limited rights publishes an entry, we simply ignore the app:draft element and force the entry to draft status. The only time we pay attention to app:draft is if an author with full rights publishes the entry.

- James

Teo Hui Ming wrote:
Hi, I have a question regarding the common use of app:draft in
blogging application.

In Wordpress, different roles have different capabilities. In
particular, users with "Contributor" role can only submit draft
entries, but they cannot publish entries.

So, how a blog server should response in these two scenario:
1) when contributor submits an entry without app:draft element
(implied draft='no')

2) when contributor submits an entry with an app:draft element set to 'no'

The current Worpress's AtomPub implementation rejects the request (in
both 1 and 2) with 401 Unauthorized, by telling the user that "you do
not have the right to edit/publish new posts." [1]

But.. instead of rejecting the request, since AtomPub server may
ignore app:draft element, does it make sense (and user-friendlier) if
Wordpress just process the request, returns 201 Created, but with the
app:draft set to 'yes' by the server?


[1] http://trac.wordpress.org/browser/tags/2.3.2/wp-app.php (line 251)

Thanks,