[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16133021#comment-16133021
 ] 

Bertrand Delacretaz commented on SLING-6984:


The ITs do pass as is, they fail if I apply the above patch, which tries to 
disable a non-existing service user.

I agree that the behavior that I suggest is not consistent with "delete user". 

[~anchela] WDYT, should an attempt to disable a service user that does not 
exist cause a failure, or just an informational log message but not failure? 

Note that the SlingRepository service will not start if there are any repoinit 
failures.

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
> Fix For: Repoinit Parser 1.1.2, Repoinit JCR 1.1.6
>
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16133014#comment-16133014
 ] 

Timothee Maret commented on SLING-6984:
---

[~bdelacretaz] I re-ran the IT tests successfully locally. Could it be that 
Jenkins reference an "old" SNAPSHOT or either 
org.apache.sling/org.apache.sling.repoinit.parser or 
org.apache.sling/org.apache.sling.jcr.repoinit ?

Regarding the behaviour when invoking the disable user on a non existing user, 
we could indeed make it pass and log rather than throw an exception. I did 
throw an exception to be consistent with the delete user operation (for which 
we may apply the same reasoning).

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
> Fix For: Repoinit Parser 1.1.2, Repoinit JCR 1.1.6
>
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132193#comment-16132193
 ] 

Bertrand Delacretaz commented on SLING-6984:


@maret the below patch breaks the integration tests. probably because the 
service used doesn't exist.

I think trying to disable a non-existing service user should just log an INFO 
message but not fail, as in many cases I suppose what people mean is "disable 
service user if it exists". WDYT?

{code}
Index: bundles/extensions/repoinit/it/src/main/provisioning/repoinit.txt
===
--- bundles/extensions/repoinit/it/src/main/provisioning/repoinit.txt   
(revision 1805421)
+++ bundles/extensions/repoinit/it/src/main/provisioning/repoinit.txt   
(working copy)
@@ -48,6 +48,8 @@
 create service user thirdUserFromProvisioningModel
 disable service user thirdUserFromProvisioningModel : "Disabled for testing 
reason"
 
+disable service user nonExisting3733bbc56b8a8364828d580821d97b88933c071d : 
"This should just log a message, we really mean 'disable service user if it 
exists'"
+
 register namespace (slingtest) http://sling.apache.org/ns/test/repoinit-it/v1.0
 
 register nodetypes
{code}

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
> Fix For: Repoinit Parser 1.1.2, Repoinit JCR 1.1.6
>
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132161#comment-16132161
 ] 

Timothee Maret commented on SLING-6984:
---

Thanks [~bdelacretaz]!

Commit at http://svn.apache.org/r1805421

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132152#comment-16132152
 ] 

Bertrand Delacretaz commented on SLING-6984:


Thanks, looks good to me!

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132127#comment-16132127
 ] 

Timothee Maret commented on SLING-6984:
---

Thanks [~bdelacretaz]! I have implemented the remaining in 

https://github.com/tmaret/sling/commit/3733bbc56b8a8364828d580821d97b88933c071d

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132061#comment-16132061
 ] 

Bertrand Delacretaz commented on SLING-6984:


The parser now requires a non-empty reason for disabling, 
http://svn.apache.org/r1805399

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132047#comment-16132047
 ] 

Bertrand Delacretaz commented on SLING-6984:


bq.  The implementation will enable the user if a null reason is passed and 
disable the user if the reason is not null.

Ok, I was not aware of that. I'll make the reason required in the parser 
syntax, I can make that change now.

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16132009#comment-16132009
 ] 

Timothee Maret commented on SLING-6984:
---

Thanks [~bdelacretaz]! 

The Jackrabbit API provides a single method to enable & disable a user [0]. The 
implementation will enable the user if a {{null}} reason is passed and disable 
the user if the reason is not {{null}}.

With the change in http://svn.apache.org/r1805165 the reason seems to be 
optional. Is the intention to mimic the Jackrabbit API (enable/disable in the 
same "method") or would we create two "methods", one for enabling and one for 
disabling and make sure the enable method at least provide a string to the 
Jackrabbit counterpart ?

>From the commit http://svn.apache.org/r1805165 I'd assume the latter but I may 
>miss the intent.

[0] 
https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/User.java#L76-L86

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-18 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16131954#comment-16131954
 ] 

Bertrand Delacretaz commented on SLING-6984:


Note also that we'll need to update 
https://sling.apache.org/documentation/bundles/repository-initialization.html 
once this is fully implemented

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-17 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16130056#comment-16130056
 ] 

Bertrand Delacretaz commented on SLING-6984:


I have fixed the failing integration tests and removed SNAPSHOT dependencies, 
except the repoint.parser and jcr.repoinit modules that they test. They pass 
now, at 
https://builds.apache.org/view/S-Z/view/Sling/job/sling-bundles-extensions-repoinit-it-1.8/

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-6984) Allow to disable service user

2017-08-15 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16127382#comment-16127382
 ] 

Timothee Maret commented on SLING-6984:
---

[~anchela] I have updated the description and title. Thanks for your insight!

> Allow to disable service user
> -
>
> Key: SLING-6984
> URL: https://issues.apache.org/jira/browse/SLING-6984
> Project: Sling
>  Issue Type: Improvement
>  Components: Repoinit
>Affects Versions: Repoinit Parser 1.1.0, Repoinit JCR 1.1.4
>Reporter: Timothee Maret
>
> Currently the repoinit module does not support -removing- disabling service 
> users.
> Disbling -Removing- service user is required when one user is no longer 
> needed due to service user sharing among components.
> The syntax could be the one proposed by [~anchela]
> {code}
> disable service user  
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)