I'm not sure whether this is already added in the trunk, but I would
very much like to put a uniqueness contraint on derived attributes (or
actually, we have the requirement that a combination of two attirbutes
must be unique for a user).
Is this already implemented and if not, is it scope for the future?
thanks in advance
René
it's nothing impossible but it's quite a considerable effort, so
my question is: do you think this could be a common use case?
With this workaround you loose the ability to change the
definition of C from console but you should be able to implement
all the rest of your use case.
Regards.
-- Francesco Chicchiriccò "Computer Science is no more about computers than astronomy is about telescopes." (E. W. Dijkstra)
I agree with you: this is bad :-)
> The alternative would be to create my own class, say MyUserController,
> and have it extend UserController, then overriding only create(...)
> and update(...). However, then i'd need to tell Syncope in some way to
> actually USE MyUserController instead of UserController and i could
> find no such thing in the Spring configuration OR don't know how to do
> it :(. Obviously, I would very much like to do this without copying &
> modifying some existing spring configuration leading again to reduced
> flexibility.
Well, AFAIK you can label your MyUserController as
@Controller
@RequestMapping("/user")
and overridden methods as
@PreAuthorize("hasRole('USER_CREATE')")
@RequestMapping(method = RequestMethod.POST,
value = "/mycreate")
public UserTO create(...
@PreAuthorize("hasRole('USER_UPDATE')")
@RequestMapping(method = RequestMethod.POST,
value = "/myupdate")
public UserTO update(
i.e. you can bind updated REST services at /user/mycreate (instead of
standard /user/create) and /user/myupdate (instead of standard
/user/update).
Unfortunately I don't know how to disable former binding to /user/create
- this is pure Spring 3 stuff: I'll try to seek for this but please
report here if you get something.
The ugliest part of this is that, in order to make console calling the
updated service, you must override - and this time by completely
replacing - org.syncope.console.rest.UserRestClient.
Hum... it seems to me that we should put something in roadmap as
improvement for this.
WDYT?
> Which option did you have in mind when you suggested the solution
> below?
>
> Thanks in advance,
>
> Ren�
>
>
> On Dec 16 2011, 12:06 pm, Francesco Chicchiricc�
Francesco Chicchiricc�