On 26/04/2012 16:22, Bob Lannoy wrote:
Hi,

I'm looking at user self registration.
If a user creates his own account through the console, this appears in the "user 
requests" tab in the console and then a user with necessary rights will kind of 
approve it (editing the object e.g. assign a role and saving it).

Correct.

As I understand it when I work through the REST interface (using a custom 
webapp) and calling a create on a userrequest then this assumes that a 
(user)process would convert this userrequest into a real user object? And when 
that's done the workflow kicks in?

When an UserRequest is created (it could be done by an anonymous user doing self-registration or for an authenticated user asking for modifying his own profile), the workflow does not get involved at all. Simply, the UserRequest is stored.

Only admins with enough entitlements can manipulate UserRequest objects.

Currently, the admin console performs the following steps:

1. show selected UserRequest object for review (and potentially update)
2. save -> this will perform the requested operation defined by UserRequest (create / update / delete user) - here the workflow will kick in
3. remove the UserRequest object if everything succeeded

The user request create process sounds like a workflow to me but in fact it 
isn't implemented as such?

Well, everything can be thought as a workflow :-)

Is there a way to automatically do the userrequest ->  user step? Or would I 
then need to directly create a user through the REST interface?

No: one should first read the UserRequest object, then get UserTO / UserMod / userId (depending on the nature of the UserRequest: create / update / delete), next call the corresponding REST method on UserController, finally remove the UserRequest object.

Are you proposing to encapsulate the logic reported above in a single REST method?

Regards.

--
Francesco Chicchiriccò

Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/

Reply via email to