Thanks Andrea,
It works fine :)

On Mon, Jul 23, 2018 at 8:19 PM, Andrea Patricelli <
[email protected]> wrote:

> Hi Alireza,
>
> Your code unfortunately does not work because it does not really update
> conninstance capabilities.
>
> The fastest way to achieve your goal is to throw an
> IgnoreProvisionException [1] in the if body.
>
> HTH,
> Andrea
>
> Best regards,
> Andrea
>
> [1] https://github.com/apache/syncope/blob/2_0_X/core/
> provisioning-api/src/main/java/org/apache/syncope/core/
> provisioning/api/pushpull/IgnoreProvisionException.java
>
> Il 23/07/2018 15:20, alireza ranjbaran ha scritto:
>
> Hi dears,
>
> Based on our user management policy nothing should be changed at night
> (00:00 ~ 6:00) in the Active Directory.
> I tried below code in PropagationActions to implement that in syncope but
> it does not worked. Could you please give me any hint ?
>
>
> @Override
>     public void before(final PropagationTask task, final ConnectorObject
> beforeObj) {
>
>         ConnInstance connInstance = task.getResource().getConnector();
>         //ConnInstanceTO connInstanceTO = connInstanceDataBinder.
> getConnInstanceTO(connInstance);
>
>
>         if (night() && connInstance.getCapabilities()
> .contains(ConnectorCapability.UPDATE)) {
>             connInstance.getCapabilities().remove(ConnectorCapability.
> UPDATE);
>         }
>         else {
>             connInstance.getCapabilities().add(ConnectorCapability.
> UPDATE);
>         }
>     }
>
>
>
> --
> *Best Regards,*
>
> *Alireza Ranjbaran *
> *IT Security Engineer*
>
>
>
> --
> Dott. Andrea Patricelli
> Tel. +39 3204524292
>
> Engineer @ Tirasa S.r.l.Viale Vittoria Colonna 97 - 65127 Pescara 
> <https://maps.google.com/?q=Viale+Vittoria+Colonna+97+-+65127+Pescara&entry=gmail&source=g>
> Tel +39 0859116307 / FAX +39 0859111173http://www.tirasa.net
>
> Apache Syncope PMC Member
>
>


-- 
*Best Regards,*

*Alireza Ranjbaran*
*IT Security Engineer*

Reply via email to