Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Repoinit Parser 1.6.6
-
None
Description
bdelacretaz, during preliminary investigation into SLING-10219 i noticed that there is no way to obtain the original disable reason from DisableServiceUser operation.
for the documented example:
disable service user deprecated_service_user : "Disabled user to make an example"
the jcr-repoinit UserVisitor.visitDisableServiceUser will do the following:
public void visitDisableServiceUser(DisableServiceUser dsu) { final String username = dsu.getUsername(); final String reason = dsu.getParametersDescription(); [...] }
however, DisableServiceUser.getParametersDescription looks as follows:
public String getParametersDescription() { StringBuilder sb = new StringBuilder(); sb.append(super.getParametersDescription()); if (this.reason != null) { sb.append(" : "); sb.append(this.reason); } return sb.toString(); }
where super.getParametersDescription()) returns the userName.
so, the resulting disable reason stored in the repository will be:
"deprecated_service_user : Disabled user to make an example"
instead of
"Disabled user to make an example"
note, that there is no other way to retrieve the original reason (e.g. DisableServiceUser.getReason() which means for SLING-10219 that the param-description needs to be parsed again i.e. relying on implementation detail, which looks quite wrong.
Attachments
Issue Links
- is related to
-
SLING-10270 Disabling service users sets incorrect "reason"
- Closed
- relates to
-
SLING-10219 Expand enforcing principal-based authorization option to repo-init
- Closed