<?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 Evaluating Document Library Actions based on User Attributes in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/evaluating-document-library-actions-based-on-user-attributes/m-p/302331#M255461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm attempting to restrict the availability of certain document library actions based on user attributes.&amp;nbsp; For example, if a user works for one company, show action A, if the user works for another company, show action B.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm usually writing java code against the repository; doing so for Share is a learning curve.&amp;nbsp; Right now I have an empty custom class extending BaseEvaluator wired up for the two actions.&amp;nbsp; The context in BaseEvaluator seems a little sparse.&amp;nbsp; How can I go about accessing user attributes from the BaseEvaluator evaluate function?&amp;nbsp; If that's not possible, how can I go about adding the values I'm interested in to the JSON that is passed to the evaluate function?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Sep 2015 12:27:27 GMT</pubDate>
    <dc:creator>vamirr</dc:creator>
    <dc:date>2015-09-11T12:27:27Z</dc:date>
    <item>
      <title>Evaluating Document Library Actions based on User Attributes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/evaluating-document-library-actions-based-on-user-attributes/m-p/302331#M255461</link>
      <description>I'm attempting to restrict the availability of certain document library actions based on user attributes.&amp;nbsp; For example, if a user works for one company, show action A, if the user works for another company, show action B.&amp;nbsp; I'm usually writing java code against the repository; doing so for Share is a</description>
      <pubDate>Fri, 11 Sep 2015 12:27:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/evaluating-document-library-actions-based-on-user-attributes/m-p/302331#M255461</guid>
      <dc:creator>vamirr</dc:creator>
      <dc:date>2015-09-11T12:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating Document Library Actions based on User Attributes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/evaluating-document-library-actions-based-on-user-attributes/m-p/302332#M255462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know if this will help. In an older Alfresco application, using Alfresco Explorer, we added users to different groups&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and then checked the groups in the evaluators.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AuthorityService authorityService = Repository.getServiceRegistry(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FacesContext.getCurrentInstance()).getAuthorityService();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set&amp;lt;String&amp;gt; authorities = authorityService.getAuthoritiesForUser(user);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (String auth : authorities) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (auth.equals(this.getNeededAuthGroup())) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; isAuthorized = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 19:54:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/evaluating-document-library-actions-based-on-user-attributes/m-p/302332#M255462</guid>
      <dc:creator>art99trash</dc:creator>
      <dc:date>2015-12-21T19:54:10Z</dc:date>
    </item>
  </channel>
</rss>

