Some users want to be able to hide their photograph so that other users will not see it when looking at them from the Organization Chart or from performing a Directory Search within the User Application. However, members of the Human Resources group need the ability to see every User's photograph when looking at the Organization Chart or when performing a Directory Search.
In the User Application, there is the ability for Users to hide their photograph so that it can not be seen by other users. However, when an attribute is added to the attribute srvprvHideAttributes that attribute can not be seen on the user in question by any other user within the User Application. There is not the ability to have certain users / groups still be able to see these “hidden” attribute(s) on the user.
Utilize ACL's within the IDVault, a Null Driver, and do not use the attribute srvprvHideAttributes Attached is a Null Driver that will monitor for a configured boolean attribute to change state and take the following actions:
- If the monitor attribute is set to true, then it will remove the configured rights (For Example: Read) from the configured container (For Example: ou=medical-idmsample,o=novell) and add them to the configured group (For Example: cn=HR,ou=groups,ou=medical-idmsample,o=novell) for the configured attribute (For Example: photo) of the user.
- If the monitor attribute is set to false, then it will add the configured rights (For Example: Read) for the configured container (For Example: ou=medical-idmsample,o=novell) and remove them from the configured group (For Example: cn=HR,ou=groups,ou=medical-idmsample,o=novell) for the configured attribute (For Example: photo) of the user.
This null driver has been written to utilize GCVs as must as possible so that it will not require the code in the rules to be re-written. The driver has the following GCVs:
- group – The Group that will have permission when the user hides the attribute
- container – The Container that will not have permission when the user hides the attribute
- watchAttribute – Attribute to watch. This attribute must be added to the Filter in this driver, added to the Entity in use in the Directory Abstraction Layer (DAL) and Edit must be enabled. All User need the ability to read and modify this attribute on them self. Finally, the attribute must be exposed in the Edit view of the Detail portlet within the User Application.
- ModAttribute – The attribute that will have permissions modified on for the user
- permissionLevel - An integer that is used to determine what the ACL will be set to. For example, a 2 on an attribute right is READ access.
All configuration notes for this driver are located in three (3) locations:
- Properties -> General Tab -> Notes
- Policy: HidePhotoChanges -> Policy Description
- All of the GCVs have comments
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.