You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by nscendoni <gi...@git.apache.org> on 2016/06/24 22:16:06 UTC

[GitHub] syncope pull request #26: Identity Recertification

GitHub user nscendoni opened a pull request:

    https://github.com/apache/syncope/pull/26

    Identity Recertification

    Hi all,
    
    I started one possible implementation for Identity Re-certification. Please let me know if you think this is interesting for the project and if you agree with the proposed design.
    I performed following modifications:
    1. I introduced one new method in the interface: UserWorkflowAdapter and one implementation in the class: AbstractUserWorkflowAdapter
    2. I modified the BPMN userWorkflow.bpmn20.xml in order to add one step to recertify users. Users not recertified will be deleted.
    3.  I wrote one test Task to invoke the recertification method for all the users.
    
    I still have to work on the approval for the re-certification, configuration of recertification task, accounts and role recertifications etc. I wanted to have one feedback and suggestions from you before proceeding.
    
    Regards
    
    Nicola

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nscendoni/syncope master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/syncope/pull/26.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #26
    
----
commit f46935bd87283675f62a60b03e474f1cfa310f81
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-23T10:45:11Z

    First attempt with user recertification

commit 713bf3223b8ee008ffa173e7ae8d589122d66517
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-23T10:46:31Z

    Merge remote-tracking branch 'upstream/master'

commit 11a28c5222649eacb0b6968eb19b9a72c2c1e95f
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-23T15:43:01Z

    Fixes

commit cbc0ae293b1a6d97e305e5b0cc1a9111a9242ba4
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-23T15:43:51Z

    Added scheduler for Identoty Recertification

commit f9cbc4e674c2a5b1094c969518c574c78d020a8b
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-24T06:52:22Z

    removed old recert

commit 876c1fdff3707cf8d790d5306b1bd1adfeb43d6b
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-24T15:32:41Z

    added logs

commit 48db49bd559bbf70fc5429902ddaf2f04a21b412
Author: Nicola Scendoni <sc...@gmail.com>
Date:   2016-06-24T15:37:51Z

    Added Recertification step

commit cf3a16ff28691b6039d155dfeffed613042ac885
Author: nscendoni <sc...@gmail.com>
Date:   2016-06-24T21:59:11Z

    restore userWorkflow

commit d0cee68c82e85bfcb74cee04a17d67e27759b48f
Author: nscendoni <sc...@gmail.com>
Date:   2016-06-24T22:01:37Z

    removed old project

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488648
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,79 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import java.util.List;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +/**
    + *
    + * @author wipro
    + */
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    +
    +    @Autowired
    +    UserDAO userDao;
    +
    +    @Autowired 
    +    UserWorkflowAdapter engine;
    +    
    +    @Override
    +    protected String doExecute(boolean dryRun) throws JobExecutionException {
    +        LOG.info("Hello from Nicola");
    +        for (int i = 0; i < 2; i++) {
    +            LOG.debug("TestSampleJob#doExecute round {} time {}", i, new Date().toString());
    +            try {
    +                Thread.sleep(1000);
    +            } catch (InterruptedException ex) {
    +                throw new JobExecutionException("Job interrupted");
    +            }
    +        }
    +
    +        for (User u :userDao.findAll()) {
    +            LOG.debug("Processing user: "+u.getUsername());
    +            List<? extends UPlainAttr> attrs = u.getPlainAttrs();
    +            
    +            if (u.getWorkflowId() != null && !u.getWorkflowId().equals("")) {
    +                LOG.debug("Recertifiyng user: "+u.getUsername());
    +                engine.doRequestCertify(u);
    +                LOG.debug("User: "+u.getUsername() + " Recertified");
    +            } else {
    +                LOG.debug("User: "+u.getUsername() + " cannot be recertified");            
    +            }
    +            for (UPlainAttr a: attrs) {
    --- End diff --
    
    Don't see why this loop is needed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76007411
  
    --- Diff: pom.xml ---
    @@ -197,6 +197,16 @@ under the License.
           <url>http://people.apache.org/~anzelld/</url>
         </developer>
         <developer>
    +      <id>anzelld</id>
    +      <name>Nicola Scendoni</name>
    +      <organization>The Apache Software Foundation</organization>
    +      <organizationUrl>http://www.apache.org/</organizationUrl>
    +      <roles>
    +        <role>committer</role>
    +      </roles>
    +      <url>http://people.apache.org/~anzelld/</url>
    --- End diff --
    
    ...guess you'll need to change `anzelld` with your own ASF id, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76007392
  
    --- Diff: pom.xml ---
    @@ -197,6 +197,16 @@ under the License.
           <url>http://people.apache.org/~anzelld/</url>
         </developer>
         <developer>
    +      <id>anzelld</id>
    --- End diff --
    
    ...guess you'll need to change `anzelld` with your own ASF id, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833563
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,100 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import org.apache.syncope.core.persistence.api.dao.ConfDAO;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttrUniqueValue;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.activiti.task.Recertify;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    --- End diff --
    
    Please explain why this class (e.g. the actual recertification task) is placed here (hence in the code only used for tests) rather than in the `core/workflow-java` Maven module


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/syncope/pull/26


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76006983
  
    --- Diff: core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java ---
    @@ -41,6 +42,12 @@
     
         private long recertificationTimeLong = -1;
     
    +    public static final String LAST_RECERTIFICATOR_ATTR = "lastRecertificator";
    --- End diff --
    
    You should not need this anymore, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833317
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,100 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    --- End diff --
    
    Bad license header


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76309830
  
    --- Diff: pom.xml ---
    @@ -197,6 +197,16 @@ under the License.
           <url>http://people.apache.org/~anzelld/</url>
         </developer>
         <developer>
    +      <id>anzelld</id>
    +      <name>Nicola Scendoni</name>
    +      <organization>The Apache Software Foundation</organization>
    +      <organizationUrl>http://www.apache.org/</organizationUrl>
    +      <roles>
    +        <role>committer</role>
    +      </roles>
    +      <url>http://people.apache.org/~anzelld/</url>
    --- End diff --
    
    yeah :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76552030
  
    --- Diff: core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/PlainSchemaTest.java ---
    @@ -47,7 +47,7 @@
         @Test
         public void findAll() {
             List<PlainSchema> schemas = plainSchemaDAO.findAll();
    -        assertEquals(38, schemas.size());
    +        assertEquals(39, schemas.size());
    --- End diff --
    
    You should not have added a plain schema, with latest changes, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71832883
  
    --- Diff: core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Recertify.java ---
    @@ -0,0 +1,102 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.core.workflow.activiti.task;
    +
    +import java.text.DateFormat;
    +import java.text.SimpleDateFormat;
    +import java.util.Date;
    +import org.apache.syncope.common.lib.types.AnyTypeKind;
    +import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory;
    +import org.apache.syncope.core.persistence.api.entity.EntityFactory;
    +import org.apache.syncope.core.persistence.api.entity.PlainSchema;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.workflow.activiti.ActivitiUserWorkflowAdapter;
    +import org.springframework.beans.factory.annotation.Autowired;
    +import org.springframework.stereotype.Component;
    +
    +@Component
    +public class Recertify extends AbstractActivitiServiceTask {
    +
    +    public static final String LAST_RECERTIFICATOR_ATTR = "lastRecertificator";
    --- End diff --
    
    Such static fields can be removed once settling `lastRecertificator` / `lastRecertification` as class fields.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope issue #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on the issue:

    https://github.com/apache/syncope/pull/26
  
    Thanks for opening [SYNCOPE-880|https://issues.apache.org/jira/browse/SYNCOPE-880], I have commented there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833609
  
    --- Diff: fit/core-reference/src/test/java/org/apache/syncope/fit/core/RecertificationITCase.java ---
    @@ -0,0 +1,90 @@
    +/*
    --- End diff --
    
    Bad license header


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74380553
  
    --- Diff: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java ---
    @@ -96,4 +96,12 @@
     
         List<? extends Role> getRoles();
     
    +    String getLastRecertificator();
    +
    +    void setLastRecertificator(String lastRecertificator);
    +
    +    Date getLastRecertificion();
    --- End diff --
    
    Fix spell: `getLastRecertification()`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76531606
  
    --- Diff: core/workflow-activiti/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -82,12 +82,47 @@ under the License.
         
         <serviceTask id="delete" name="Delete" activiti:expression="#{delete.execute(execution.processInstanceId)}"/>
         <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/>
    +    <!-- Recertification tasks -->
    +    <userTask id="RecertificationRequest" name="Recertification Request" activiti:candidateGroups="managingDirector" activiti:formKey="recertify">
    --- End diff --
    
    Where can I find some instruction on how to update the reference guide?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74701544
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,100 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import org.apache.syncope.core.persistence.api.dao.ConfDAO;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttrUniqueValue;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.activiti.task.Recertify;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    --- End diff --
    
    The only reason was to extend AbstractSchedTaskJobDelegate without modifying dependencies.
    I'm refactoring this code to implement SchedTaskJobDelegate interface. Please advice if you have a better advice


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833076
  
    --- Diff: core/workflow-activiti/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -82,12 +82,47 @@ under the License.
         
         <serviceTask id="delete" name="Delete" activiti:expression="#{delete.execute(execution.processInstanceId)}"/>
         <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/>
    +    <!-- Recertification tasks -->
    +    <userTask id="RecertificationRequest" name="Recertification Request" activiti:candidateGroups="managingDirector" activiti:formKey="recertify">
    --- End diff --
    
    You cannot refer to the `managingDirector` group in the production workflow, as production content does not contain such group.
    Please remove `activiti:candidateGroups` from this element.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71832626
  
    --- Diff: core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java ---
    @@ -349,11 +349,33 @@ protected void saveForFormSubmit(final User user, final String password, final P
         }
     
         @Override
    +    public WorkflowResult<String> doRequestCertify(final User user) {
    +        String authUser = AuthContextUtils.getUsername();
    +        engine.getRuntimeService().setVariable(user.getWorkflowId(), FORM_SUBMITTER, authUser);
    +
    +        LOG.debug("Executing request-certify");
    +        Set<String> performedTasks = doExecuteTask(user, "request-certify", null);
    +        for (String s: performedTasks) {
    --- End diff --
    
    Please remove this debug loop (other methods of this class do not have it)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76006998
  
    --- Diff: core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java ---
    @@ -81,11 +88,11 @@ public void init() {
     
         public boolean toBeRecertified(final User user) {
     
    -        UPlainAttr lastUserRecertification = user.getPlainAttr(Recertify.LAST_RECERTIFICATION_ATTR);
    +        UPlainAttr lastUserRecertification = user.getPlainAttr(LAST_RECERTIFICATION_ATTR);
    --- End diff --
    
    You should not need this anymore, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope issue #26: Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on the issue:

    https://github.com/apache/syncope/pull/26
  
    Hi Francesco,
    
    Thanks for your review. I will create a new JIRA issue with a functional
    description of my proposal.
    I will address the comments and complete the feature implementation until
    an "usable" state. The goal of this push request was to validate the design
    with you.
    
    Regarding the change to Activiti workflow I paste here the part of diagram
    that I modified:
    
    [image: Immagine incorporata 1]
    
    2016-06-25 15:36 GMT+02:00 Francesco Chicchiricc� <no...@github.com>
    :
    
    > Hi @nscendoni <https://github.com/nscendoni>, thanks for taking this
    > initiative!
    >
    > Could you please fill an issue on JIRA (as "new feature") where you also
    > provide functional high-level description?
    > Once you got the issue number (SYNCOPE-XXX), please reference it in your
    > commit messages so that this PR gets automatically linked.
    >
    > About the proposed changes:
    >
    >    1. I made some comments, please address
    >    2. It is not immediately evident to me the kind of change you made to
    >    the Activiti user workflow definition: I suppose you have added a
    >    "request-certify" task, could you please elaborate?
    >
    > \u2014
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/syncope/pull/26#issuecomment-228541913>, or mute
    > the thread
    > <https://github.com/notifications/unsubscribe/AG806oeRN7OpBRyHIRkQfZnGVQt8Kcs6ks5qPS7igaJpZM4I-KuN>
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74380625
  
    --- Diff: core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java ---
    @@ -184,6 +185,14 @@
         @Column(nullable = true)
         private String securityAnswer;
     
    +    @Column(nullable = true)
    +    private String lastRecertificator;
    +
    +    @Column(nullable = true)
    +    @Temporal(TemporalType.TIMESTAMP)
    +    private Date lastRecertificion;
    --- End diff --
    
    Fix spell `lastRecertification`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833155
  
    --- Diff: core/workflow-activiti/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -82,12 +82,47 @@ under the License.
         
         <serviceTask id="delete" name="Delete" activiti:expression="#{delete.execute(execution.processInstanceId)}"/>
         <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/>
    +    <!-- Recertification tasks -->
    +    <userTask id="RecertificationRequest" name="Recertification Request" activiti:candidateGroups="managingDirector" activiti:formKey="recertify">
    +      <extensionElements>
    +        <activiti:formProperty id="fullname" name="Identity" type="string" expression="${user.getPlainAttr('fullname').getUniqueValue().getStringValue()}" writable="false"/> 
    +        <activiti:formProperty id="username" name="Username" type="string" expression="${user.username}" writable="false"/>
    +        <activiti:formProperty id="approve" name="Approve?" type="boolean" required="true"/>
    --- End diff --
    
    `approve` and `reason for rejecting` can be fine for test workflow, please make them more verbose and appropriate for recertification


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope issue #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on the issue:

    https://github.com/apache/syncope/pull/26
  
    @nscendoni thanks for your work: I have added some minor comments.
    
    Once addressed, please also rebase and squash and I'd say we'll be ready to merge this PR.
    
    As you might have seen, I have assigned SYNCOPE-880 to you and also set the fix version to 2.0.0 (meaning that this work is expected to be part of next stable release).
    
    Nice job!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71832647
  
    --- Diff: core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java ---
    @@ -349,11 +349,33 @@ protected void saveForFormSubmit(final User user, final String password, final P
         }
     
         @Override
    +    public WorkflowResult<String> doRequestCertify(final User user) {
    +        String authUser = AuthContextUtils.getUsername();
    +        engine.getRuntimeService().setVariable(user.getWorkflowId(), FORM_SUBMITTER, authUser);
    +
    +        LOG.debug("Executing request-certify");
    +        Set<String> performedTasks = doExecuteTask(user, "request-certify", null);
    +        for (String s: performedTasks) {
    +            LOG.debug("request-certity: {}", s);
    +        }
    +        LOG.debug("request-certify performed");
    +                
    +        PropagationByResource propByRes = engine.getRuntimeService().getVariable(
    +                user.getWorkflowId(), PROP_BY_RESOURCE, PropagationByResource.class);
    +
    +        saveForFormSubmit(
    +                user, null, propByRes);
    +                
    +        return new WorkflowResult<>(user.getKey(), null, performedTasks);
    +    }
    +
    +    @Override
         protected WorkflowResult<String> doSuspend(final User user) {
             Set<String> performedTasks = doExecuteTask(user, "suspend", null);
             updateStatus(user);
             User updated = userDAO.save(user);
     
    +
    --- End diff --
    
    Please remove this blank line.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488631
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,79 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import java.util.List;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +/**
    + *
    + * @author wipro
    + */
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    +
    +    @Autowired
    +    UserDAO userDao;
    +
    +    @Autowired 
    +    UserWorkflowAdapter engine;
    +    
    +    @Override
    +    protected String doExecute(boolean dryRun) throws JobExecutionException {
    +        LOG.info("Hello from Nicola");
    --- End diff --
    
    Please remove.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488649
  
    --- Diff: fit/core-reference/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -1,101 +1,64 @@
     <?xml version="1.0" encoding="UTF-8"?>
    -<!--
    -Licensed to the Apache Software Foundation (ASF) under one
    -or more contributor license agreements.  See the NOTICE file
    -distributed with this work for additional information
    -regarding copyright ownership.  The ASF licenses this file
    -to you under the Apache License, Version 2.0 (the
    -"License"); you may not use this file except in compliance
    -with the License.  You may obtain a copy of the License at
    -
    -  http://www.apache.org/licenses/LICENSE-2.0
    -
    -Unless required by applicable law or agreed to in writing,
    -software distributed under the License is distributed on an
    -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    -KIND, either express or implied.  See the License for the
    -specific language governing permissions and limitations
    -under the License.
    --->
    -<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" 
    -             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    -             xmlns:activiti="http://activiti.org/bpmn" 
    -             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" 
    -             xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" 
    -             xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" 
    -             typeLanguage="http://www.w3.org/2001/XMLSchema" 
    -             expressionLanguage="http://www.w3.org/1999/XPath" 
    -             targetNamespace="http://activiti.org/bpmn20">
    -  
    +<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://activiti.org/bpmn20">
    --- End diff --
    
    Please re-add the ASF license header.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74380581
  
    --- Diff: core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/user/User.java ---
    @@ -96,4 +96,12 @@
     
         List<? extends Role> getRoles();
     
    +    String getLastRecertificator();
    +
    +    void setLastRecertificator(String lastRecertificator);
    +
    +    Date getLastRecertificion();
    +
    +    void setLastRecertificion(Date lastRecertificion);
    --- End diff --
    
    Fix spell: setLastRecertification(Date lastRecertification)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833798
  
    --- Diff: fit/core-reference/src/test/java/org/apache/syncope/fit/core/RecertificationITCase.java ---
    @@ -0,0 +1,90 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core;
    +
    +import java.util.Arrays;
    +import java.util.Date;
    +import java.util.List;
    +import javax.ws.rs.core.Response;
    +import org.apache.commons.lang3.time.DateUtils;
    +import org.apache.syncope.common.lib.to.SchedTaskTO;
    +import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
    +import org.apache.syncope.common.lib.to.WorkflowFormTO;
    +import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
    +import org.apache.syncope.common.rest.api.service.TaskService;
    +import org.apache.syncope.fit.core.reference.TestIdentityRecertification;
    +import static org.junit.Assert.assertFalse;
    +import static org.junit.Assert.assertNotNull;
    +import static org.junit.Assert.assertTrue;
    +import org.junit.FixMethodOrder;
    +import org.junit.Test;
    +import org.junit.runners.MethodSorters;
    +
    +@FixMethodOrder(MethodSorters.JVM)
    +public class RecertificationITCase extends AbstractTaskITCase{
    +
    +    private void runRecertTask() {
    +        SchedTaskTO task = new SchedTaskTO();
    +        task.setActive(true);
    +        task.setName("IdentityRecert");
    +        task.setJobDelegateClassName(TestIdentityRecertification.class.getName());
    +
    +        Response response = taskService.create(task);
    +        task = getObject(response.getLocation(), TaskService.class, SchedTaskTO.class);
    +        assertNotNull(task);
    +
    +        Date initial = new Date();
    +        Date later = DateUtils.addSeconds(initial, 2);
    +
    +        taskService.execute(new ExecuteQuery.Builder().key(task.getKey()).startAt(later).build());
    --- End diff --
    
    Any particular reason for not executing the task via `AbstractTaskITCase#execTask`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope issue #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on the issue:

    https://github.com/apache/syncope/pull/26
  
    Hi @nscendoni, thanks for taking this initiative!
    
    Could you please fill an issue on JIRA (as "new feature") where you also provide functional high-level description?
    Once you got the issue number (`SYNCOPE-XXX`), please reference it in your commit messages so that this PR gets automatically linked.
    
    About the proposed changes:
     1. I made some comments, please address
     1. It is not immediately evident to me the kind of change you made to the Activiti user workflow definition: I suppose you have added a "request-certify" task, could you please elaborate?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488618
  
    --- Diff: core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java ---
    @@ -201,4 +201,9 @@ public WorkflowFormTO claimForm(final String taskId) {
             throw new WorkflowException(new UnsupportedOperationException("Not supported."));
         }
     
    +    @Override
    +    public WorkflowResult<String> doRequestCertify(User user) {
    +        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    --- End diff --
    
    Some more meaningful message is expected here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488636
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,79 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import java.util.List;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +/**
    + *
    + * @author wipro
    + */
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    +
    +    @Autowired
    +    UserDAO userDao;
    +
    +    @Autowired 
    +    UserWorkflowAdapter engine;
    +    
    +    @Override
    +    protected String doExecute(boolean dryRun) throws JobExecutionException {
    +        LOG.info("Hello from Nicola");
    +        for (int i = 0; i < 2; i++) {
    --- End diff --
    
    I don't get the reason for this loop.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by Francesco Chicchiriccò <il...@apache.org>.
Yeah, sure

Il 22 luglio 2016 19:57:08 CEST, nscendoni <gi...@git.apache.org> ha scritto:
>Github user nscendoni commented on a diff in the pull request:
>
>    https://github.com/apache/syncope/pull/26#discussion_r71919116
>  
>--- Diff:
>core/persistence-jpa/src/test/resources/domains/MasterContent.xml ---
>    @@ -461,7 +470,15 @@ under the License.
>       <SyncopeSchema id="mderToBePropagated"/>
><DerSchema id="mderToBePropagated" expression="mderived_sx + '-' +
>mderived_dx" 
>                  anyTypeClass_id="generic membership"/>
>    -        
>    +
>    +  <SyncopeSchema id="lastRecertification"/>
>    --- End diff --
>    
>    I agree with this approach. Shall I also modify User interface?
>
>
>---
>If your project is set up for it, you can reply to this email and have
>your
>reply appear on GitHub as well. If your project does not have this
>feature
>enabled and wishes so, or if the feature is enabled but not working,
>please
>contact infrastructure at infrastructure@apache.org or file a JIRA
>ticket
>with INFRA.
>---


-- 
Francesco Chicchiricc�

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

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC,
CXF Committer, OpenJPA Committer
http://home.apache.org/~ilgrosso/

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71919116
  
    --- Diff: core/persistence-jpa/src/test/resources/domains/MasterContent.xml ---
    @@ -461,7 +470,15 @@ under the License.
       <SyncopeSchema id="mderToBePropagated"/>
       <DerSchema id="mderToBePropagated" expression="mderived_sx + '-' + mderived_dx" 
                  anyTypeClass_id="generic membership"/>
    -        
    +
    +  <SyncopeSchema id="lastRecertification"/>
    --- End diff --
    
    I agree with this approach. Shall I also modify User interface?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] syncope issue #26: [SYNCOPE-880] Identity Recertification

Posted by Nicola Scendoni <sc...@gmail.com>.
Hi,

I have added one file with some documentation of this feature in my last
commit. I do not have linked it with the rest of the documentation since I
still have some issue generating documentation with maven. You can decide
if this should be included or if you want to wait to have something more
"stable".
Regards

Nicola

2016-08-29 6:34 GMT+02:00 ilgrosso <gi...@git.apache.org>:

> Github user ilgrosso commented on the issue:
>
>     https://github.com/apache/syncope/pull/26
>
>     @nscendoni this PR looks good, thanks for your contribution!
>     I'll be able to merge it from next Thursday on.
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>

[GitHub] syncope issue #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on the issue:

    https://github.com/apache/syncope/pull/26
  
    @nscendoni this PR looks good, thanks for your contribution!
    I'll be able to merge it from next Thursday on.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833002
  
    --- Diff: core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Recertify.java ---
    @@ -0,0 +1,102 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.core.workflow.activiti.task;
    +
    +import java.text.DateFormat;
    +import java.text.SimpleDateFormat;
    +import java.util.Date;
    +import org.apache.syncope.common.lib.types.AnyTypeKind;
    +import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory;
    +import org.apache.syncope.core.persistence.api.entity.EntityFactory;
    +import org.apache.syncope.core.persistence.api.entity.PlainSchema;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.workflow.activiti.ActivitiUserWorkflowAdapter;
    +import org.springframework.beans.factory.annotation.Autowired;
    +import org.springframework.stereotype.Component;
    +
    +@Component
    +public class Recertify extends AbstractActivitiServiceTask {
    +
    +    public static final String LAST_RECERTIFICATOR_ATTR = "lastRecertificator";
    +    
    +    public static final String LAST_RECERTIFICATION_ATTR = "lastRecertification";
    +    
    +    public static final String RECERTIFICATION_TIME = "identity.recertification.day.interval";
    +
    +    @Autowired
    +    protected UserDAO userDAO;
    +
    +    @Autowired
    +    protected EntityFactory entityFactory;
    +
    +    @Autowired
    +    private PlainSchemaDAO plainSchemaDAO;
    +
    +    @Autowired
    +    protected AnyUtilsFactory anyUtilsFactory;
    +
    +    private PlainSchema lastRecertificationSchema;
    +
    +    private PlainSchema lastRecertificatorSchema;
    +
    +    @Override
    +    protected void doExecute(final String executionId) {
    +
    +        LOG.debug("Processing Recertification {}", executionId);
    +        User user = engine.getRuntimeService().
    +                getVariable(executionId, ActivitiUserWorkflowAdapter.USER, User.class);
    +        String submitter = engine.getRuntimeService().
    +                getVariable(executionId, ActivitiUserWorkflowAdapter.FORM_SUBMITTER, String.class);
    +
    +        LOG.debug("Saving Recertification information for user {}", user.getUsername());
    +
    +        lastRecertificatorSchema = plainSchemaDAO.find(LAST_RECERTIFICATOR_ATTR);
    +        lastRecertificationSchema = plainSchemaDAO.find(LAST_RECERTIFICATION_ATTR);
    +        setSchemaReadonly(false);
    +
    +
    +        UPlainAttr recertifierAttr = entityFactory.newEntity(UPlainAttr.class);
    +        recertifierAttr.setOwner(user);
    +        recertifierAttr.setSchema(lastRecertificatorSchema);
    +
    +        recertifierAttr.add(submitter, anyUtilsFactory.getInstance(AnyTypeKind.USER));
    +
    +        DateFormat format = new SimpleDateFormat(lastRecertificationSchema.getConversionPattern());
    +        String recertificationDate = format.format(new Date());
    +        UPlainAttr recertAttr = entityFactory.newEntity(UPlainAttr.class);
    +        recertAttr.setOwner(user);
    +        recertAttr.setSchema(lastRecertificationSchema);
    +
    +        recertAttr.add(recertificationDate, anyUtilsFactory.getInstance(AnyTypeKind.USER));
    +
    +        user.add(recertAttr);
    +        user.add(recertifierAttr);
    +
    +        setSchemaReadonly(true);
    +
    +        userDAO.save(user);
    +    }
    +
    +    private void setSchemaReadonly(final boolean readonly) {
    --- End diff --
    
    This method can be removed for the same reasons stated above for static fields; however, it wasn't needed anyway as read-only attributes are meant for being managed via DAO rather than via DataBider.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488614
  
    --- Diff: core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/AbstractUserWorkflowAdapter.java ---
    @@ -78,6 +78,10 @@ public String getPrefix() {
             return doUpdate(userDAO.authFind(userPatch.getKey()), userPatch);
         }
     
    +    @Override
    +    public abstract WorkflowResult<String> doRequestCertify(final User user);
    --- End diff --
    
    What's the purpose of this abstract method? It is declared in the interface and implemented in the concrete subclasses, it could be safely removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74886819
  
    --- Diff: core/workflow-activiti/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -82,12 +82,47 @@ under the License.
         
         <serviceTask id="delete" name="Delete" activiti:expression="#{delete.execute(execution.processInstanceId)}"/>
         <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/>
    +    <!-- Recertification tasks -->
    +    <userTask id="RecertificationRequest" name="Recertification Request" activiti:candidateGroups="managingDirector" activiti:formKey="recertify">
    --- End diff --
    
    Removing some production workflow looks fine, thanks.
    
    You might consider writing some sections about identity recertification in the [reference guide](https://ci.apache.org/projects/syncope/reference-guide.html), also including some operational notes as how to set assignment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833186
  
    --- Diff: core/workflow-activiti/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -229,4 +284,4 @@ under the License.
           </bpmndi:BPMNEdge>
         </bpmndi:BPMNPlane>
       </bpmndi:BPMNDiagram>
    -</definitions>
    --- End diff --
    
    Please avoid such modifications (blank lines at the end of files) if possible


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74886344
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,100 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import org.apache.syncope.core.persistence.api.dao.ConfDAO;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttrUniqueValue;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.activiti.task.Recertify;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    --- End diff --
    
    You could always add it to both `MasterContent.xml`, but without schedule, so that it is not run automatically.
    WDYT?
    
    Finally, extending `AbstractSchedTaskJobDelegate` and putting all logic into `doExecute` is considered best-practice, as other things are performed as well (conditionally saving execution, notification and audit, ..).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r69087269
  
    --- Diff: core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/ActivitiUserWorkflowAdapter.java ---
    @@ -348,8 +348,15 @@ protected void saveForFormSubmit(final User user, final String password, final P
         public WorkflowResult<String> doRequestCertify(final User user) {
             LOG.debug("Executing request-certify");
             Set<String> performedTasks = doExecuteTask(user, "request-certify", null);
    -        LOG.debug(performedTasks.iterator().next());
    +        LOG.debug("request-certify TaskID:"+performedTasks.iterator().next());
    --- End diff --
    
    Please rewrite such statement as
    ```java
    LOG.debug("request-certify TaskID: {}, performedTasks.iterator().next());
    ```
    
    More at http://www.slf4j.org/faq.html#logging_performance


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r72031798
  
    --- Diff: core/persistence-jpa/src/test/resources/domains/MasterContent.xml ---
    @@ -461,7 +470,15 @@ under the License.
       <SyncopeSchema id="mderToBePropagated"/>
       <DerSchema id="mderToBePropagated" expression="mderived_sx + '-' + mderived_dx" 
                  anyTypeClass_id="generic membership"/>
    -        
    +
    +  <SyncopeSchema id="lastRecertification"/>
    --- End diff --
    
    Sure, please go ahead.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833259
  
    --- Diff: core/workflow-api/src/main/java/org/apache/syncope/core/workflow/api/UserWorkflowAdapter.java ---
    @@ -60,6 +61,10 @@
         WorkflowResult<Pair<String, Boolean>> create(
                 UserTO userTO, boolean disablePwdPolicyCheck, final Boolean enabled, boolean storePassword);
     
    +
    +    WorkflowResult<String> doRequestCertify(final User user);
    --- End diff --
    
    `do*` methods are defined by abstract implementations for inner execution: please rename this method as `requestCertify`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74701618
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,100 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import org.apache.syncope.core.persistence.api.dao.ConfDAO;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttrUniqueValue;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.activiti.task.Recertify;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +public class TestIdentityRecertification extends AbstractSchedTaskJobDelegate {
    --- End diff --
    
    Another advice regarding this topic. I did not added the task in the production MasterContent.xml. I guess that this should be added by administrator according to their needs. Please let me know if you agree with this approach


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76006872
  
    --- Diff: core/persistence-jpa/src/main/resources/domains/MasterContent.xml ---
    @@ -1,4 +1,4 @@
    -<?xml version="1.0" encoding="UTF-8"?>
    +t<?xml version="1.0" encoding="UTF-8"?>
    --- End diff --
    
    Guess you would undo this modification, right? :-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope issue #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on the issue:

    https://github.com/apache/syncope/pull/26
  
    @nscendoni FYI here is the added documentation: https://ci.apache.org/projects/syncope/reference-guide.html#identity-recertification


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r74701636
  
    --- Diff: core/workflow-activiti/src/main/resources/userWorkflow.bpmn20.xml ---
    @@ -82,12 +82,47 @@ under the License.
         
         <serviceTask id="delete" name="Delete" activiti:expression="#{delete.execute(execution.processInstanceId)}"/>
         <sequenceFlow id="flow99" sourceRef="delete" targetRef="theEnd"/>
    +    <!-- Recertification tasks -->
    +    <userTask id="RecertificationRequest" name="Recertification Request" activiti:candidateGroups="managingDirector" activiti:formKey="recertify">
    --- End diff --
    
    I removed it. I guess we need to have more flexibility on recertifier assignment. I'll open a new ISSUE in jira with some proposal.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by nscendoni <gi...@git.apache.org>.
Github user nscendoni commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76309662
  
    --- Diff: core/persistence-jpa/src/main/resources/domains/MasterContent.xml ---
    @@ -1,4 +1,4 @@
    -<?xml version="1.0" encoding="UTF-8"?>
    +t<?xml version="1.0" encoding="UTF-8"?>
    --- End diff --
    
    sure :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71832801
  
    --- Diff: core/persistence-jpa/src/test/resources/domains/MasterContent.xml ---
    @@ -461,7 +470,15 @@ under the License.
       <SyncopeSchema id="mderToBePropagated"/>
       <DerSchema id="mderToBePropagated" expression="mderived_sx + '-' + mderived_dx" 
                  anyTypeClass_id="generic membership"/>
    -        
    +
    +  <SyncopeSchema id="lastRecertification"/>
    --- End diff --
    
    We should probably better handle `lastRecertification` and `lastRecertificator` rather as `User` / `JPAUser` fields rather than schemas.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71832672
  
    --- Diff: core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Recertify.java ---
    @@ -0,0 +1,102 @@
    +/*
    --- End diff --
    
    Bad license header


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r71833309
  
    --- Diff: core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultUserWorkflowAdapter.java ---
    @@ -207,4 +207,10 @@ public WorkflowFormTO claimForm(final String taskId) {
             throw new WorkflowException(new UnsupportedOperationException("Not supported."));
         }
     
    +    @Override
    +    public WorkflowResult<String> doRequestCertify(final User user) {
    +        //Implement here Identity Recertification Process 
    --- End diff --
    
    Form processing is not supported by the default adapter, so remove comment and change message to "Not supported"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488623
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,79 @@
    +/*
    --- End diff --
    
    This license header is not correct, please see other source files.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: [SYNCOPE-880] Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r76006988
  
    --- Diff: core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/job/IdentityRecertification.java ---
    @@ -41,6 +42,12 @@
     
         private long recertificationTimeLong = -1;
     
    +    public static final String LAST_RECERTIFICATOR_ATTR = "lastRecertificator";
    +
    +    public static final String LAST_RECERTIFICATION_ATTR = "lastRecertification";
    --- End diff --
    
    You should not need this anymore, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] syncope pull request #26: Identity Recertification

Posted by ilgrosso <gi...@git.apache.org>.
Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/26#discussion_r68488627
  
    --- Diff: fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestIdentityRecertification.java ---
    @@ -0,0 +1,79 @@
    +/*
    + * Copyright 2016 The Apache Software Foundation.
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.syncope.fit.core.reference;
    +
    +import java.util.Date;
    +import java.util.List;
    +import org.apache.syncope.core.persistence.api.dao.UserDAO;
    +import org.apache.syncope.core.persistence.api.entity.user.UPlainAttr;
    +import org.apache.syncope.core.persistence.api.entity.user.User;
    +import org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate;
    +import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
    +import org.quartz.JobExecutionException;
    +import org.springframework.beans.factory.annotation.Autowired;
    +
    +/**
    --- End diff --
    
    `@author` is not used within sources, please remove.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---