Show TOC

Background documentationMapping to the User Locate this document in the navigation structure

 

You can base the ID prefix for each object on the current administrator. You can provide to each administrator a set of prefixes from which to choose.

For example, you can allow content administrators to select admin.content, and allow super administrators to select admin or admin.content.

Procedure

  1. For the NamingConventionsSrv service, set the following properties:

    • Activate namespaces: true

    • Mode: user.

    • XML file: The path of the XML file that contains the rules for prefixes.

    For more information on configuring the NamingConventionsSrv service, see Configuring the Service.

  2. Create an XML file that defines the rules for prefixes.

    The XML file is made up of the following tags:

    Tag

    Description

    definitions

    The root element.

    namespace

    Defines a prefix.

    All principals (users, groups or roles) that are defined in the body of the tag are authorized to use this prefix.

    The following attributes are defined for this tag:

    • Id (required): A prefix

    principal

    Defines a principal (user, group or role) that is authorized to use the prefix

    The following attributes are defined for this tag:

    • uniqueName (required): A name of a user (user ID), group (group ID) or role (PCD address).

    • typeID (required): The type of principal.

      Valid values are USER, GROUP or ROLE.

    • scope (optional): Indicates that the user, group or role is authorized to use the current prefix but no additional sub-prefixes that are defined within the current element.

      See below for more information.

  3. Put the XML file in the location defined by the naming conventions service's XML file property.

Result

Administrators no longer can enter any prefix for objects, but must select one of the prefixes assigned to the administrator.

Example

The following XML file defines rules for prefixes:

Syntax Syntax

  1. <definitions>
    
       <namespace id="admin">  
    
    
    
          <principal uniqueName="Administrator" typeId="USER"/>
    
    
    
          <namespace id="content">   
    
             <principal uniqueName="pcd:portal_content/administrator/content_admin/content_admin_role"
              typeId="ROLE"/>        
    
    
    
             <namespace id="role01">
    
                <principal uniqueName="pcd:/.../content_admin_role_01"
                 typeId="ROLE"/>
    
             </namespace>
    
          </namespace>
    
    
    
          <namespace id="system"> 
    
             <principal uniqueName="pcd:portal_content/administrator/system_admin/system_admin_role"            typeId="ROLE"/>      
    
    
    
             <namespace id="role01">
    
                <principal uniqueName="pcd:/.../system_admin_role_01"
                 typeId="ROLE"/>     
    
             </namespace>
    
          </namespace>
    
       </namespace>
    
    
    
       <namespace id="everyone">  
    
          <principal uniqueName="Everyone" typeId="GROUP"/>  
    
       </namespace>
    
    </definitions>
    
End of the code.

The following are the prefixes defined in the XML and the users/groups/roles that are authorized to use them:

Prefix

Authorized Users/Roles

admin

Administrator (user)

admin.content

Administrator (user)

Content Administrator (role)

admin.content.role01

Administrator (user)

Content Administrator (role)

Content Administrator of Role 1 (role)

admin.system

Administrator (user)

System Administrator (role)

admin.system.role01

Administrator (user)

System Administrator (role)

System Administrator of Role 1 (role)

admin.everyone

Everyone (group)

Scope

The scope attribute of the principal tag enables you to authorize a user, group or role for a specific prefix but not for any sub-prefixes.

For example, the following authorizes to myUser the prefixes admin and admin.content:

Syntax Syntax

  1. <definitions>
    
        <namespace id="admin"> 
    
    
    
            <principal uniqueName="myUser" typeId="USER"/>
    
            <namespace id="content"> </namespace>
    
    
    
        </namespace>
    
    
    
    </definitions>
    
End of the code.

However, the following authorizes to myUser the prefix admin but not admin.content, or any other sub-prefixes defined for admin:

Syntax Syntax

  1. <definitions>
    
        <namespace id="admin"> 
    
    
    
            <principal uniqueName="myUser" typeId="USER" scope="current" />
    
            <namespace id="content"> </namespace>
    
    
    
        </namespace>
    
    
    
    </definitions>
    
End of the code.