cancel
Showing results for 
Search instead for 
Did you mean: 

Members of sites in whatever role can see all registered users

pieter_shimanow
Champ in-the-making
Champ in-the-making
Hi,

I am pretty new at configuring Alfresco (4.0 Enterprise). I am looking for a solution for the following issue:

Members of sites in whatever role can see all registered users, see site members  and invite new members.
However:
- Consumers should not be able to see registered users
- Consumers should not be able to see other site members
- Consumers should not be able to invite new site members

- Contributors should not be able to see registered users
- Contributors should not be able to invite new site members

I played around on the ACL in my local setup (public-services-security-context.xml), ACL is all over the place and changing ACL sometimes even breaks the page or other functionality.

What changes do I have to make?

Is there another way? Is there a (browser) interface for changes like this?

Thanks!

10 REPLIES 10

afaust
Legendary Innovator
Legendary Innovator
Hello Pieter,

the problem with this possibly being "a standard feature" is that there is a myriad of ways the condition may be used or what a condition actually represents. I myself have used it to check wether a user has a user home (may not be the case in some situations) and if so, present a quick-link to that user home in the menu. Alfresco can't possibly support all variations on this and the current, standard methods of customization make it sufficiently easy for coders to add a new condition ("easy" does not include the specific logic necessary to determine if that condition applies) with a bare minimum of about 8 lines XML and 1 line JavaScript.

All that should be necessary is a JavaScript file header.get.js in /tomcat/shared/classes/alfresco/web-extension/site-webscripts/com/example/components/header with the following content:

model.permissions.myCondition = true | false; // true or false depending on logic of check, i.e. group containment (that logic is specific and not provided here)


To activate it, this requires an extension module in an arbitrarily named XML in /tomcat/shared/classes/alfresco/web-extension/site-data/extensions with the following minimal content:

<extension>
   <modules>
      <module>
         <id>My Extension</id>
         <customizations>
            <customization>
               <sourcePackage>com.example.components.header</sourcePackage>
               <targetPackage>org.alfresco.components.header</targetPackage>
            <customization>
         </customizations>
      </module>
   </modules>
</extension>


The final activation is done via an Admin Tool of share via the URI /share/page/modules/deploy

After that, you can use "myCondition" as a condition in the header configuration.

All this is standard customization and should be supported for the next few major versions - minor modifications may be necessary, but nothing major…

Regards
Axel