[
https://issues.apache.org/jira/browse/SLING-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15692784#comment-15692784
]
Bertrand Delacretaz commented on SLING-6285:
--------------------------------------------
bq. Having the possibility to override
isAllowLoginAdministrativeForBundleOverridden allows implementations extending
from the abstract base classes to implement a different strategy for
whitelisting.
I don't understand - {{isAllowLoginAdministrativeForBundleOverridden}} is
private to {{AbstractSlingRepositoryManager}}, so it cannot be overridden. It's
{{allowLoginAdministrativeForBundle}} that can be, and while debatable (we
might have made that method final to enforce the use of the whitelist service
which is replaceable) it's acceptable.
IIUC what you are doing is checking whether
{{allowLoginAdministrativeForBundle}} is overridden, and in that case declaring
that a {{LoginAdminWhitelist}} service is not required, so not waiting for that
service before registering the {{SlingRepository}} service. Is that correct?
If yes that's not wrong, just unusual, so it it works I'm fine leaving things
as is. Maybe just document this trick better in the code that uses
{{isAllowLoginAdministrativeForBundleOverridden}} so we remember the intention.
Don't get me wrong, I'm not against clever stuff like this, we just need to
document it clearly and have strong tests for it to avoid trouble for the poor
souls who have to understand this again a few years from now. Also considering
those poor souls might be ourselves ;-)
> Implement LoginAdminWhitelist in JCR Base
> -----------------------------------------
>
> Key: SLING-6285
> URL: https://issues.apache.org/jira/browse/SLING-6285
> Project: Sling
> Issue Type: Improvement
> Components: JCR
> Affects Versions: JCR Base 2.4.2
> Reporter: Julian Sedding
> Assignee: Julian Sedding
> Fix For: JCR Oak Server 1.1.4, JCR Base 3.0.0
>
> Attachments: SLING-6285-jsedding.patch
>
>
> JCR Base should provide a default implementation
> {{AbstractSlingRepositoryManager#allowLoginAdministrativeForBundle(Bundle)}}
> with a configurable {{LoginAdminWhitelist}}. Implementation that want a
> different logic can then still choose to overwrite the method.
> cc [~cziegeler], [~bdelacretaz]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)