AnsweredAssumed Answered

I need an help on how can I implement a security level

Question asked by diegop on Jan 28, 2009
Latest reply on Jan 28, 2009 by diegop
i have to customize an alfresco 3 labs in order to add a new "security level": each content will have one of 5 levels: NO SECURITY, RESERVED, VERY RESERVED, SECRET, VERY SECRET.

Each user will have a similar security level (that I will get it from an external LDAP).

- every user with RESERVED security level associated will see contents with NO SECURITY and RESERVED levels.
- every user with SECRET security level associated will see contents with NO SECURITY, RESERVED, VERY RESERVED and SECRET levels.
and so on..

For now, I have added a custom property to "cm:content":

<type name="cm:content">
            <property name="cm:content">
               <!— Index content in the background –>
               <index enabled="true">
         <property name="cm:securityLevel">
            <title>Security Level</title>
               <constraint ref="cm:filename" />
               <constraint type="LENGTH">
                       <parameter name="minLength"><value>0</value></parameter>
                       <parameter name="maxLength"><value>128</value></parameter>
               <constraint type="LIST">
                  <parameter name="allowedValues">
                            <value>NO SECURITY</value>
                            <value>VERY RESERVED</value>
                  <value>VERY SECRETvalue>
                    <parameter name="caseSensitive"><value>true</value></parameter>

and added a property to "cm:person" to store the security level of the user named "cm:securityId".

            <property name="cm:securityId">

for last, I have modified the JSP to view the security level of a user (correctly set by a custom LDAP importer) in the details page and I have modified the JSP for set every metatags of a content to add a select combo box for choosing its security level.

So, someone can tell me what is the best way to show to a user with security level X only the content with security level less or equal than X?
What customization I have to do on the permission model?

Thanks! And best regards.