<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Enable/Disable user programmatically in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310520#M263650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating users via a custom UserRegistry returning NodeDescription with properties. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; PropertyMap properties = node.getProperties();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; properties.put(ContentModel.PROP_USERNAME, user.getName());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; properties.put(ContentModel.PROP_FIRSTNAME, user.getFirstName());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; properties.put(ContentModel.PROP_LASTNAME, user.getLastName());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; properties.put(ContentModel.PROP_EMAIL, user.getEmailAddress());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it appears some users are coming up as disabled, particularly when viewed via share.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What property or service methods are available to set the user to enabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried these two, PROP_ENABLED &amp;amp; PROP_MODEL_ACTIVE&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But they didn't seem to affect share.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Dec 2013 23:42:58 GMT</pubDate>
    <dc:creator>gommo</dc:creator>
    <dc:date>2013-12-02T23:42:58Z</dc:date>
    <item>
      <title>Enable/Disable user programmatically</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310520#M263650</link>
      <description>I'm creating users via a custom UserRegistry returning NodeDescription with properties. e.g. PropertyMap properties = node.getProperties(); properties.put(ContentModel.PROP_USERNAME, user.getName()); properties.put(ContentModel.PROP_FIRSTNAME, user.getFirstName()); properties.put(ContentModel.PROP_L</description>
      <pubDate>Mon, 02 Dec 2013 23:42:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310520#M263650</guid>
      <dc:creator>gommo</dc:creator>
      <dc:date>2013-12-02T23:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Enable/Disable user programmatically</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310521#M263651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, once you create the user you need to create authentication for that user which will enable the user in repo.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 06:44:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310521#M263651</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2013-12-03T06:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Enable/Disable user programmatically</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310522#M263652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure I totally follow. The user exists in the repo. I just don't seem to be able to control the enable/disable flag.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; authenticationService.setAuthenticationEnabled(user.getName(), false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; logger.debug(" Is this user mutable? " + authenticationService.isAuthenticationMutable(user.getName()) + " ,enabled? " + authenticationService.getAuthenticationEnabled(user.getName()));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; logger.debug(" Is person enabled? " + personService.isEnabled(user.getName()));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The above outputs that the user is mutable and enabled even though the first line specifically disables the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SO I'm at a loss as to how to properly control the enable/disable of a user account. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Similar I guess to this thread which doesn't have a resolution either - &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/forum/installation-upgrades-configuration-integration/authentication-ldap-sso/synchronise#comment-141025" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/forum/installation-upgrades-configuration-integration/authentication-ldap-sso/synchronise#comment-141025&lt;/A&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Dec 2013 02:30:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/enable-disable-user-programmatically/m-p/310522#M263652</guid>
      <dc:creator>gommo</dc:creator>
      <dc:date>2013-12-04T02:30:40Z</dc:date>
    </item>
  </channel>
</rss>

