+

Search Tips   |   Advanced Search

Configure the profile photo feature

Edit settings in the profiles-policy.xml file to configure the profile photo feature.

To edit configuration files, see Start the wsadmin client

When the profile photo feature is enabled, users can enhance their profile page by adding a picture of themselves. As administrator, we can enable or disable this feature for specific profile types, depending on the organization's needs. We can also configure access control settings for the profile photo feature according to profile type.

The following steps provide information about the properties that we can set for the profile photo feature, and the access levels and scopes that we can configure.

  1. Check out the profiles-policy.xml file:

    To get cell name...

  2. Edit profiles-policy.xml file using a text editor, from the temporary directory to which it was checked out.

  3. Edit the following properties for the profile photo feature as needed.

    profile.photo

    Enable or disable profile photo feature.

    This property takes a string value. Possible values include:

    • true. Enable the photo feature for users with the specified profile type. The user interface displays the user's photo and provides options for editing the photo.

    • false. Disable the photo feature for users with the specified profile type. The user interface does not display the user's photo or options for editing the photo. A generic photo image is displayed in place of the user's photo.

    profile.photo.update

    Control access to view the photo. In additional to the scope attribute for this access control, dissallowNonAdminIfInactive can be used to indicate whether photos for inactive users can be viewed. Administrative users can view photos regardless of the configuration.

    Access levels for this property can be defined using one of the following scopes:

    • none. No one can update the profile photo of users with the specified profile type.

    • self. Users with the specified profile type can update their own profile photo.

    profile.photo.view

    Controls access to view the photo.

    In additional to the scope attribute for this access control, dissallowNonAdminIfInactive can be used to indicate whether photos for inactive users can be viewed. Administrative users can view photos regardless of the configuration.

    In the following photo policy sample, users who have been assigned the reader role can view active user's photos with the default profile type, but photos for inactive users are only viewable by users who have been assigned theadmin role. When a user's photo is not viewable, the default gray photo image is displayed.

    <profileType type="default" enabled="true">
    <acl name="profile.photo.view" scope="reader" 
       dissallowNonAdminIfInactive="true"/>
    <acl name="profile.photo.update" scope="self" />
    </profileType>

    The following sample enables the profile photo feature for the default profile type, but restricts access to update profile photos to profile owners and administrators. For users with the contractor profile type, the profile photo is enabled, but no access is provided to update the profile photo for users of this profile type. The profile photo feature is disabled for users with the visitor profile type, and no one can update the profile photo for users of this profile type.

    <feature name="profile.photo">
       <profileType type="default" enabled="true">
          <acl name="profile.photo.update" scope="self" />
       </profileType>
       <profileType type="contractor" enabled="true">
          <acl name="profile.photo.update" scope="none" />
       </profileType>
       <profileType type="visitor" enabled="false">
          <acl name="profile.photo.update" scope="none" />
       </profileType>
    </feature>

  4. Save the changes and check the profiles-policy.xml file back in :

      ProfilesConfigService.checkInPolicyConfig()

  5. To exit the wsadmin client, type exit at the prompt.

  6. Stop and restart the Profiles server.


Parent topic:
Configure profile features