Configuring the tagging feature
Edit settings in the profiles-policy.xml file to configure the tagging feature.
Before you begin
About this task
- When tagging is disabled, the tags widget is not automatically hidden in the user interface. To hide the widget for a specific user type, use the policy settings in profiles-policy.xml. To hide the widget for all users, delete or comment out the relevant widget entry in the widget-config.xml file. For more information, see Managing widgets in Profiles.
- When tagging is disabled for a given user type, the user's existing tags are still searchable; there is no mechanism available for controlling access to the tags from a reading and viewing perspective. If you choose to display the tags widget but you disable tagging for a particular user type, it might cause confusion for your users when search results include tags for a particular profile, but the tags do not display in that profile.
Procedure
To enable or disable tagging by profile type, complete the following
steps:
- Start the wsadmin client from the following
directory of the system on which you installed the Deployment Manager:
where app_server_root is the WebSphere® Application Server installation directory and dm_profile_root is the Deployment Manager profile directory, typically dmgr01.app_server_root\profiles\dm_profile_root\bin
You must start the client from this directory or subsequent commands that you enter do not execute correctly.
-
Start the Profiles Jython script interpreter.
-
Use the following command to check out the profiles-policy.xml
file:
where:ProfilesConfigService.checkOutPolicyConfig("<working_directory>", "cell_name")
- working_directory is the temporary working directory to which the configuration XML and XSD files will be copied. The files are kept in this working directory while you make changes to them.
- cell_name is the name of the IBM® WebSphere® Application Server cell hosting the Profiles application. This argument is required.
ProfilesConfigService.checkOutPolicyConfig("/wsadminoutput", "jdoe30Node02Cell")
-
Open the profiles-policy.xml file using a text editor, from the
temporary directory to which you checked it out.
Edit the following properties for the tagging feature as needed.
- profile.tag
Controls user access to add tags to their profile.
Access levels for this property can be defined using one of the following scopes:- none. No one can tag the profile of users with the specified profile type.
- self. Users with the specified profile type can tag their own profiles. Administrators can also tag the profiles of users with the specified profile type.
- colleagues_not_self. Only people who belong to the network of the user with the
specified profile type, and who have the person role, can tag the user's
profile. Users with the specified profile type cannot tag their own profiles.Note: If resourceOwner is specified on the access check, the resource owner constraint must also be met, unless the user has the self role.
- colleagues_and_self. People who belong to the network of the user with the
specified profile type, and who have the person role, can tag the user's
profile. Users with the specified profile type can tag their own profiles.Note: If resourceOwner is specified on the access check, the resource owner constraint must also be met, unless the user has the self role.
- person_not_self. Users with the person J2EE role can tag the profile of users with
the specified profile type. Users with the specified profile type cannot tag their
own profiles.Note: If resourceOwner is specified on the access check, the resource owner constraint must also be met, unless the user has the self role.
- person_and_self. Users with the person J2EE role can tag the profile of users with
the specified profile type. Users with the specified profile type can also tag their
own profiles.Note: If resourceOwner is specified on the access check, the resource owner constraint must also be met, unless the user has the self role.
For example:
This code sample enables tagging for users with the default profile type. Users with the person J2EE role can tag users of the default profile type, and default users can tag their own profiles. Tagging is also enabled for users with the contractor profile type. People in the profile owner's network who have the person role can add tags to profiles of the contractor type, and contractor users can tag their own profiles. Tagging is disabled for users with the visitor profile type.<feature name="profile.tag"> <profileType type="default" enabled="true"> <acl name="profile.tag.add" scope="person_and_self" /> </profileType> <profileType type="contractor" enabled="true"> <acl name="profile.tag.add" scope="colleagues_and_self" /> </profileType> <profileType type="visitor" enabled="false"> <acl name="profile.tag.add" scope="none" /> </profileType> </feature>
-
Save your changes and check the profiles-policy.xml file back in
using the following command:
ProfilesConfigService.checkInPolicyConfig()
- To exit the wsadmin client, type exit at the prompt.
- Stop and restart the Profiles server.