On 24/01/2013 09:09, Jan Bernhardt wrote:
Hi Francesco,
why did you removed StatusMod without asking for its purpose???
This was needed for future REST API! In REST all cares about resources and not
processes. Therefore URLs should not look like this /enableUser or /disableUser
, but rather focus on a resource like GET user/status and then return status as
enabled or disabled. Or PUT operation with Status (enabled/disabled) for
enabling/disabling operation.
For this purpose I introduced setStatus method in UserService, which you simply
removed, as well as StatusMod...
I know that we haven't discusses final UserService Interface on the mailing
list yet. But please don't remove methods without any mailinglist feedback.
HI Jan,
sorry for not saying anything about this is advance, but I could revert
the same question to you: why did you add such strange thing called
StatusMod and UserService.setStatus() without any mailing list feedback? :-)
Yesterday I was surprised by the fact that enable / disable from admin
console wasn't working any more and I finally got to an empty
implementation of this setStatus() in UserServiceProxy that broke that
feature.
I am quite worried of how many of this "side effects" are currently
disseminating the 1.1.0-SNAPSHOT source code.
If you had asked this in mailing list in advance, we could have
discussed the fact that, given the application domain we are running in
(Identity Management), the whole concept of "unbundled" user status
setting is barely not applicable IMO.
For example, invoking activate() on an user is not necessarily
equivalent to setting user status to active - depending on the workflow.
Hence, to mark this fact and get everyone's attention to not break the
main features of Syncope for pure non-functional technology pursuit,
I've just removed StatusMod and UserService.setStatus().
Let's discuss now the best way to match RESTful best practice with
actual domain requirements, provided that a general-purpose setStatus()
IMO is not adequate: we should keep the current activate / suspend /
reactivate, possibly with separate URLs.
Regards.
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/