Creating users

You can create a user for each person and associate different roles to the user so that this user can have proper levels of access privileges to the Product Master Server system.

Before you begin

Ensure that you have approving authority. Also, ensure that the roles to be assigned to the user are created.

About this task

Defining the roles and authorization involve the following tasks:
  • Identifying roles.
  • Creating the roles and authentication.
  • Managing the roles.

Procedure

Use any one of the following methods to create the user.
Be sure to assign at least one role to the user at the time of user creation.
Option Description
User interface
  1. Navigate to the Organization Hierarchy on the left pane and select the organization that you want to add the user to. Right-click and select Add User from the menu.
  2. Select the roles that you would like you to associate with the user.
  3. Provide details about the user such as the user name, first name, last name, email ID, and password.
Java™ API The following sample Java API code creates users.
Context ctx = PIMContextFactory.getCurrentContext();
OrganizationManager manager = ctx.getOrganizationManager();
Role role = manager.getRole("Admin");
List<Role> roles = new ArrayList<Role>();
roles.add(role);
Organization organization = manager.getOrganizationHierarchy("Default Organization  Hierarchy").getOrganizationByPath("Default Organization");
User user = manager.createUser("Admin", "AAA", "BBB", "xx@abc.com", true , "password",  roles, organization, true);
user.save();
Script API The following sample script API creates users.
var user = createUser("Admin", "AAA", "BBB", "xx@abc.com", true , "password", roles, organization, true);
A user is created. You can view the user in the User Console.