[
https://issues.apache.org/jira/browse/SLING-9091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040814#comment-17040814
]
Angela Schreiber commented on SLING-9091:
-----------------------------------------
pull request at
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/7
> Principal-based AC-setup fails for transient service users
> ----------------------------------------------------------
>
> Key: SLING-9091
> URL: https://issues.apache.org/jira/browse/SLING-9091
> Project: Sling
> Issue Type: Bug
> Components: Repoinit
> Reporter: Angela Schreiber
> Assignee: Angela Schreiber
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> while conducting additional tests with repo-init i noticed that
> {{TestUtil.parseAndExecute}} always persists a given operation, which doesn't
> entirely seem to reflect that nature of the {{RepositoryInitializer}} which
> will only call {{Session.save}} after the processing of a list of operations.
> While each create-path operation is already following by a save-call to
> prevent issues with the resource-based access control setup, the
> principal-based ac-setup will currently fail if the service user principal
> has not been persisted.
> Proposed fix: if the principal-lookup returns {{null}} during principal-based
> ac setup -> retry after saving pending changes. That's at least consistent
> with the current behaviour in the resource-based setup.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)