[
https://issues.apache.org/jira/browse/SLING-2491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410258#comment-13410258
]
Chris Papademos commented on SLING-2491:
----------------------------------------
A word and a blow. What if config.getProperties() returns null though? Or am I
doing something wrong?
public void activateSelfRegistration(BundleContext context) {
ServiceReference reference = context
.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin confAdmin = (ConfigurationAdmin) context
.getService(reference);
try {
Configuration config =
confAdmin.getConfiguration("org.apache.sling.jackrabbit.usermanager.impl.post.CreateUserServlet");
Dictionary props = config.getProperties();
if (props == null) {
System.out.println("This is not supposed to
happen...");
}
} catch (IOException e) {
e.printStackTrace();
}
}
> How can I change the self.registration.enabled property in java?
> ----------------------------------------------------------------
>
> Key: SLING-2491
> URL: https://issues.apache.org/jira/browse/SLING-2491
> Project: Sling
> Issue Type: Task
> Components: JCR
> Affects Versions: JCR Jackrabbit User Manager 2.1.0
> Environment: Xubuntu
> Reporter: Chris Papagrigoriou
>
> Hey I kinda can't find out how to change the the self.registration.enabled
> property of the CreateUserServlet.
> I tried it via the ConfigurationAdmin but it doesn't seem to work.
> Can anyone tell me how to change it?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira