Saturday, 29 June 2013

Alfresco Share Tag Management

 Tag management module can be integrated in Alfresco share for managing tags on any content stored in alfresco repository.

Just what you need to do is install the provided amp file under your Alfresco_Home/amps and amps_share directories.

Alfresco-Share Tag Management module is compatible with Alfresco 3.4.0 and later versions.

Steps for installation are mentioned in the link below:




Snapshots:





 You can add, edit, search tags and also just click on the tag and you will get the complete list of documents tagged with that particular name.
One more important point to note is : If you search alfresco repository using normal or advanced search facility in alfresco share, you won't be able to search documents with partial tag names supplied in the search text box.
For example: In normal or advanced search box (in Alfresco share), if you enter "sanket", your document tagged as "My name is sanket" won't be searched up. You compulsorily need to enter the complete tag name "My name is sanket" that too within double quotes. Then alfresco will search that document and bring it under the search results.

 Here, even if you enter half tag name or you can say partial tag name, your tag will be searched and further you can see the documents tagged with that name.

This will obviously save a lot of time when you have similar requirements of tag management. Also it can be suggested to clients who aim similar kind of functionality in their project.

Hope, this helps.

Please do let me know if anybody wants to utilize this functionality and facing issues while implementation.  

Friday, 28 June 2013

Show All Users in Alfresco Share

Hi Guise, 
             You might have noticed that in Alfresco DM, we have a facility of "Show All" users.  



It is not provided OOTB in share.
So if anybody wants to use it or add it in their Alfresco share UI, they can use it as per the steps mentioned below in this document.
Clicking "Show All Users" button will list all the users created in alfresco. (shown below)


Clicking "Show All Users" button will list all the users created in alfresco. (shown below)



Steps
  1. Put the button "Show All Users" in people-finder.get.html.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\people-finder)

    Code:
    <!-- My Customized button - START -->
    <div class="showAll-button">
    <span id="${el}-showAll-button" class="yui-button yui-push-button">
    <span class="first-child">
    <button>${msg("button.showAll")}</button>
    </span>
    </span>
    </div>
    <!-- My Customized button - END -->

    2. Change the reference of the people-finder.js in people-finder.get.head.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\people-finder)

      Code:
    <script type="text/javascript" src="${page.url.context}-extension/components/people-finder/people-finder.js"></script>

    3. Extend people-finder.js

    Note: As it is difficult to copy each line of YUI/JS customized code here, please send me an email if you want this file. I will share it with you. Sorry for the inconvenience.

    4. Put the button "Show All Users" in users.get.html.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\console)
    Code:
    <!-- My Customized button - START -->
    <span class="yui-button yui-push-button" id="${el}-showAll-button">
    <span class="first-child"><button>${msg("button.showAll")}</button></span>
    </span>
    <!-- My Customized button - END -->

 5. 
  1. Change the reference of the users.js in users.get.head.ftl (location -> shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\console)
    Code:
    <script type="text/javascript" src="${page.url.context}-extension/components/console/users.js"></script>


    6. Extend users.js

      Note: As it is difficult to copy each line of YUI/JS customized code here, please send me an email if you want this file. I will share it with you. Sorry for the inconvenience.

Wednesday, 26 June 2013

Password policy in Alfresco Share

Many of us have a requirement in our projects to implement password policies when creating or editing users.
If you are required to implement the same in Alfresco Share, I am ready with the code and UI.

You can customize the password policy according to the project requirement like:
  • Min 1 special char, 1 case-sensitive letter, 1 case-insensitive letter, 1 number required
  • Min password length – 6, max password length – 20 required
  • Min 3 special char, 3 numbers and 1 case-sensitive letter, etc. required

Can be any one of the mentioned above or a new one.


Here is the implementation part:

When a new user is created in share, the password field has a default validation (of minimum 3 characters). I have put a new constraint that atleast 6 characters are required with minimum 1 number, 1 special character, 1 case-sensitive and 1 case-insensitive letter.

If anyone of the above is violated, it won't be accepted.
The following screenshots demonstrate the same.


The password entered (as shown in above screenshot) is only four characters and that too without containing any special character, number or case-sensitive letter.

On clicking "Create User" button, a message as shown in below screenshot will be displayed.



Until the user enters a password with the above defined password policy, it won't be accepted.

Similar implementation is done while editing user details.\



Also, when a user tries to change his password,



he won't be allowed until he follows the pre-defined password policy.



Contact me if anybody has such requirement to be implemented.

Thank you for going through the blog.