Show TOC

Basing the Namespace Convention on a PrincipalLocate this document in the navigation structure

Use

You can base the namespace in an object ID on the principal (user, group or role) that is currently creating or changing the object. To use this option, you need to provide an XML file that defines a set of valid namespaces for each principal.

For example, the namespace for a content administrator may be admin.content , whereas a super administrator can select either admin or admin.content .

Procedure
  1. Configure the NamingConventionsSrv service for basing the namespace on a principal. For more information, see Configuring the Naming Conventions Service .

  2. Create an XML file that defines the rules for namespaces, using the following tags:

    • definitions

    • namespace

    • principal

    The examples in this section provide more information.

  3. Place the XML file in the location defined by the XML file property in the naming conventions service.

Example

The following XML file defines rules for namespaces according to the principal that is creating or changing the PCD object:

<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>

         

The following are the namespaces defined in the XML and the principals (users/groups/roles) authorized to use them:

Namespace

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 namespace but not for any namespaces defined in subelements.

For example, the following authorizes both the namespaces admin and admin.content for a principal named myUser :

<definitions>
    <namespace id="admin"> 
        <principal uniqueName="myUser" typeId="USER"/>
        <namespace id="content"> </namespace>
    </namespace>
</definitions>

            

However, the following uses the scope attribute to authorize for the principal myUser only the namespace admin but not admin.content , or any other namespaces defined for admin within subelements:

<definitions>
    <namespace id="admin"> 
        <principal uniqueName="myUser" typeId="USER" scope="current" />
        <namespace id="content"> </namespace>
    </namespace>
</definitions>