Hi!

On 03/12/2013 13:38, Timo Hatakka wrote:

Hi!

how can you add a virtual read-only attribute to an user by GUI or
using your own code? Only way to include a virtual attribute is to
give some dummy initial value in the user interface and this trick
cannot be used if the attribute is read only. Seems to be a problem
even in 1.1.5.


There is no problem in providing values for read-only virtual
attributes via client code.

Via admin console, however, this is rather impossible: could you
fill an issue, please?

I will.

Also, is there some design mistake in PROPAGATION / SYNCRONIZATION
selection with virtual attributes? I would suppose that
SYNCRONIZATION will only read values from external resource and
PROPAGATION will write values to external resource, but is it so?


No: PROPAGATION / SYNCHRONIZATION / BOTH refer to the *purpose* of
mapping entry, e.g. if Syncope will be using that mapping entry only
during propagation, only during synchronization or in both cases.
A read-only virtual attribute (whose value comes from external
resource A) can be propagated to external resource B, for example.

I had(in 1.1.4) following test, which you can iterate:

add virtual attribute HR:title to the schema
add read mapping: resource HR / USER / UserVirtualSchema / HR:title /
title / false / SYNCRONIZATION
add write mapping: resource LDAP / USER / UserVirtualSchema / HR:title
/ title / false / PROPAGATION
add a virtual attribute for a user by giving a string "test" as a
dummy value and save
value "test" is propagated to ldap as supposed (because no other
values available here)
open user, virtual attributes are now "test" and the value coming from HR

I suppose that system should show only value coming from HR not the
previous value written to LDAP. I first supposed that cache is used in
a wrong way in this situation but even the application server restart
keeps the situation the same. And notice that I didn't run any task.

Regards,
Timo



Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/



Reply via email to