On 16/04/2013 14:49, Martin van Es wrote:
Hi Franseco,

Thx for the quick reply.

Yes you understood me correctly in the assumption of how I wanted to conditionally assign resources. Even if I went ahead and wrote such a class (which I doubt I can, but who knows ;) your answer implies that the role would contain the assigned resources and this was part of my question: I can not assign a resource to a newly created role in 1.1.0? The interface lets me do the assignment, but when I inspect the result, all resources are still unassigned. Is this expected behaviour and if so, how would SyncActionsClass' assignment to a role help me if the roles can't contain resources assignments?

A couple of bugs have been found in Apache Syncope 1.1.0, already fixed in 1.1.1-SNAPSHOT, including the one you are reporting above.
Please take a look at [3] for a workaround until 1.1.1 is released.

Regards.

On Tue, Apr 16, 2013 at 2:37 PM, Francesco Chicchiriccò <[email protected] <mailto:[email protected]>> wrote:

    On 16/04/2013 14:26, Martin van Es wrote:

        I was wondering if it's possible to automatically provisioin
        certain resource for one account based on a condition
        (attribute) set in the source resource.

        A hypothetical situation:

        A CSVdir synchronisation resource contains all my users, some
        of which initially need to have an LDAP account propagated,
        other a DB account and a lucky few both.

        Is there a way to specify a role attribute in the CSVdir
        resource that gets mapped to a role, that assigns the LDAP
        and/or the DB resource for the user? I tried creating two
        roles (LDAP/DB) with mappings to my resources LDAP and DB, but
        in the interface, the assigned resources are not preserved in
        the role definition dialog. Apart from that, would this be a
        possibility in Syncope?


    Hi Martin,
    I've understood that you want to assign upon synchronization role
    A, B or C to users from a CSVDir resource where A has assigned a
    LDAP resource, B a DB resource and C both. Is this correct?

    If so, you need to define a SyncJobActionsClass [1] or
    SyncActionsClass [2]  (depending on the Syncope version you are
    running) and implement the logic "assign role A, B or C to
    synchronizing user" in the before() method.

    Once defined such class, you will need to associate it to the
    synchronization task and it will be invoked upon synchronization.

    Regards.

    [1]
    https://cwiki.apache.org/confluence/display/SYNCOPE/SyncJobActionsClass
    [2]
    https://cwiki.apache.org/confluence/display/SYNCOPE/SyncActionsClass

[3] https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project#CreateanewSyncopeproject-Stablereleases

--
Francesco Chicchiriccò

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

Reply via email to