Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

User
[System Administration]

Functions


Function Documentation

SA_API int SA_ask_os_user_name ( tag_t  userTag,
char  osUserName[SA_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_os_user_name2
Returns the value of the OS user name attribute for a user.
Parameters:
userTag  (I)
osUserName  (O)

SA_API int SA_ask_os_user_name2 ( tag_t  userTag,
char **  osUserName 
)

Returns the value of the OS user name attribute for a user.

Parameters:
userTag  (I)
osUserName  (OF)

SA_API int SA_ask_user_citizenships ( tag_t  user_tag,
int *  num,
char ***  citizenships 
)

Retrieve user citizenships Error SA_no_privilege_for_citizenship will be returned login user is not system admin or user himself. Error PROP_invalid_object will be returned if user input tag is not valid User tag.

Parameters:
user_tag  (I) The tag of the user whose citizenship is to be retrieved.
num  (O) Number of citizenships
citizenships  (OF) num Array of citizenships

SA_API int SA_ask_user_default_local_volume ( tag_t  user_tag,
char  volume_name[SA_volume_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_default_local_volume2
Returns the default local volume name attribute for the user.
Parameters:
user_tag  (I)
volume_name  (O)

SA_API int SA_ask_user_default_local_volume2 ( tag_t  user_tag,
char **  volume_name 
)

Returns the default local volume name attribute for the user.

Parameters:
user_tag  (I)
volume_name  (OF)

SA_API int SA_ask_user_default_volume ( tag_t  user_tag,
char  volume_name[SA_volume_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_default_volume2
Returns the default volume name attribute for the user.
Parameters:
user_tag  (I)
volume_name  (O)

SA_API int SA_ask_user_default_volume2 ( tag_t  user_tag,
char **  volume_name 
)

Returns the default volume name attribute for the user.

Parameters:
user_tag  (I)
volume_name  (OF)

SA_API int SA_ask_user_geography ( tag_t  userTag,
char  geography[SA_geography_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_geography2
Returns the value of the geography attribute of a Teamcenter user.
Parameters:
userTag  (I)
geography  (O)

SA_API int SA_ask_user_geography2 ( tag_t  userTag,
char **  geography 
)

Returns the value of the geography attribute of a Teamcenter user.

Parameters:
userTag  (I)
geography  (OF)

SA_API int SA_ask_user_gov_clearance ( tag_t  userTag,
char  gov_clearance[SA_gov_clearance_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_gov_clearance2
Returns the value of the Government clearance attribute of a Teamcenter user.
Parameters:
userTag  (I)
gov_clearance  (O)

SA_API int SA_ask_user_gov_clearance2 ( tag_t  userTag,
char **  gov_clearance 
)

Returns the value of the Government clearance attribute of a Teamcenter user.

Parameters:
userTag  (I)
gov_clearance  (OF)

SA_API int SA_ask_user_home_folder ( tag_t  user_tag,
tag_t folder_tag 
)

Returns the value of the home folder_tag attribute for a user. The home folder was implicitly created when you created the user.

Parameters:
user_tag  (I)
folder_tag  (O)

SA_API int SA_ask_user_identifier ( tag_t  user_tag,
char  userid[SA_user_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_identifier2
Returns the value of the identifier attribute for a user.
Parameters:
user_tag  (I)
userid  (O)

SA_API int SA_ask_user_identifier2 ( tag_t  user_tag,
char **  userid 
)

Returns the value of the identifier attribute for a user.

Parameters:
user_tag  (I)
userid  (OF)

SA_API int SA_ask_user_ip_clearance ( tag_t  userTag,
char  ip_clearance[SA_ip_clearance_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_ip_clearance2
Returns the value of the IP (Intellectual Property) clearance attribute of a Teamcenter user.
Parameters:
userTag  (I)
ip_clearance  (O)

SA_API int SA_ask_user_ip_clearance2 ( tag_t  userTag,
char **  ip_clearance 
)

Returns the value of the IP (Intellectual Property) clearance attribute of a Teamcenter user.

Parameters:
userTag  (I)
ip_clearance  (OF)

SA_API int SA_ask_user_login_group ( tag_t  user_tag,
tag_t group_tag 
)

Returns the default login group attribute for the user.

Parameters:
user_tag  (I)
group_tag  (O)

SA_API int SA_ask_user_mailbox ( tag_t  user_tag,
tag_t folder_tag 
)

Returns the value of the mailbox tag attribute for this user. The mailbox was implicitly created when you created the user.

Parameters:
user_tag  (I)
folder_tag  (O)

SA_API int SA_ask_user_nationality ( tag_t  userTag,
char  nationality[SA_nationality_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_nationality2
Returns the value of the nationality attribute of a Teamcenter user.
Parameters:
userTag  (I)
nationality  (O)

SA_API int SA_ask_user_nationality2 ( tag_t  userTag,
char **  nationality 
)

Returns the value of the nationality attribute of a Teamcenter user.

Parameters:
userTag  (I)
nationality  (OF)

SA_API int SA_ask_user_newstuff_folder ( tag_t  user_tag,
tag_t folder_tag 
)

Returns the value of the newstuff folder tag attribute for this user. The mailbox was implicitly created when you created the user.

Parameters:
user_tag  (I)
folder_tag  (O)

SA_API int SA_ask_user_person ( tag_t  user_tag,
tag_t person_tag 
)

Returns the value of the person_tag attribute for a user.

Parameters:
user_tag  (I)
person_tag  (O)

SA_API int SA_ask_user_person_name ( tag_t  user_tag,
char  personname[SA_person_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_ask_user_person_name2
Returns the value of the name attribute for a user.
Parameters:
user_tag  (I)
personname  (O)

SA_API int SA_ask_user_person_name2 ( tag_t  user_tag,
char **  personname 
)

Returns the value of the name attribute for a user.

Parameters:
user_tag  (I)
personname  (OF)

SA_API int SA_ask_user_ttc_date ( tag_t  userTag,
date_t ttc_date 
)

Returns the value of the ttc_date (technology transfer certification date) attribute of a Teamcenter user.

Parameters:
userTag  (I)
ttc_date  (O)

SA_API int SA_change_user_password ( tag_t  user_tag,
const char  newpassword[SA_password_size_c+1],
const char  oldpassword[SA_password_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_change_user_password2
Changes the password attribute of the user. You must be logged in as the user referenced by user_tag to change the password. The system administrator can also change the password.
Parameters:
user_tag  (I)
newpassword  (I)
oldpassword  (I)

SA_API int SA_change_user_password2 ( tag_t  user_tag,
const char *  newpassword,
const char *  oldpassword 
)

Changes the password attribute of the user. You must be logged in as the user referenced by user_tag to change the password. The system administrator can also change the password.

Parameters:
user_tag  (I)
newpassword  (I)
oldpassword  (I)

SA_API int SA_create_licensed_user ( const char  userid[SA_user_size_c+1],
const char  personname[SA_person_name_size_c+1],
const char  password[SA_password_size_c+1],
int  licenseLevel,
int  userStatus,
tag_t user_tag 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_create_licensed_user2
Creates a User object. It is not saved to the database until an explicit call to AOM_save occurs. You must specify the user_id, person_name, password, license_level and status for the user. The valid values for licenseLevel are 'author' = 0,'consumer' = 1, 'occasionaluser' = 2 or 'viewer' = 3. The valid values for status are 'active' = 0 or 'inactive' = 1. You must also specify the login group and OS user name by calling SA_set_user_login_group and SA_set_os_user_name.

Restrictions:

This function is only valid when you are logged in as the system administrator.

Parameters:
userid  (I)
personname  (I)
password  (I)
licenseLevel  (I)
userStatus  (I)
user_tag  (O)

SA_API int SA_create_licensed_user2 ( const char *  userid,
const char *  personname,
const char *  password,
int  licenseLevel,
int  userStatus,
tag_t user_tag 
)

Creates a User object. It is not saved to the database until an explicit call to AOM_save occurs. You must specify the user_id, person_name, password, license_level and status for the user. The valid values for licenseLevel are 'author' = 0,'consumer' = 1, 'occasionaluser' = 2 or 'viewer' = 3. The valid values for status are 'active' = 0 or 'inactive' = 1. You must also specify the login group and OS user name by calling SA_set_user_login_group and SA_set_os_user_name.

Restrictions: This function is only valid when you are logged in as the system administrator.

Parameters:
userid  (I)
personname  (I)
password  (I)
licenseLevel  (I)
userStatus  (I)
user_tag  (O)

SA_API int SA_create_licensed_user3 ( const char *  user_id,
const char *  person_name,
const char *  password,
int  license_level,
const char *  license_bundle,
int  user_status,
tag_t user_tag 
)

Creates a User object. It is not saved to the database until an explicit call to AOM_save occurs. The login group and OS user name must be specified by calling the ITKs SA_set_user_login_group and SA_set_os_user_name.
Valid values for the license level are:

  • 0: author
  • 1: consumer
  • 2: occasional user
  • 3: viewer

Valid values for the user status are:
  • 0: active
  • 1: inactive

The license bundle should be a valid bundle name or null value


Returned error values are:

Restrictions: This function is only valid when you are logged in as the system administrator.
This function validates that the specified status, license level, and license bundle are valid and that the user may be created with these values. It sets the status and license level properties for the unsaved User object, but the license bundle property must be set by calling SA_set_user_license_status after SA_create_licensed_user3 and AOM_save.
A purchased license bundle may include a base license level. If the license_level parameter does not match the license level contained in the specified bundle, the user's license level is set to the level contained in the bundle.
Parameters:
user_id  (I) The user id
person_name  (I) The person name
password  (I) The login password
license_level  (I) The license level
license_bundle  (I) The license bundle
user_status  (I) The user status
user_tag  (O) Tag of the newly created user

SA_API int SA_create_user ( const char  userid[SA_user_size_c+1],
const char  personname[SA_person_name_size_c+1],
const char  password[SA_password_size_c+1],
tag_t user_tag 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_create_user2
Creates a User object with 'active' status and 'author' license level. It is not saved to the database until an explicit call to AOM_save occurs. You must specify the user_id, person_name and password. You must also specify the login group and OS user name by calling SA_set_user_login_group and SA_set_os_user_name.

Restrictions:

This function is only valid when you are logged in as the system administrator.

Parameters:
userid  (I)
personname  (I)
password  (I)
user_tag  (O)

SA_API int SA_create_user2 ( const char *  userid,
const char *  personname,
const char *  password,
tag_t user_tag 
)

Creates a User object with 'active' status and 'author' license level. It is not saved to the database until an explicit call to AOM_save occurs. You must specify the user_id, person_name and password. You must also specify the login group and OS user name by calling SA_set_user_login_group and SA_set_os_user_name.

Restrictions:

This function is only valid when you are logged in as the system administrator.

Parameters:
userid  (I)
personname  (I)
password  (I)
user_tag  (O)

SA_API int SA_delete_user ( tag_t  user_tag,
tag_t  new_owning_user,
tag_t  new_owning_group,
logical  delete_objects 
)

new_owning_user and new_owning_group may be NULLTAG, provided delete_objects is true

Parameters:
user_tag  (I)
new_owning_user  (I)
new_owning_group  (I)
delete_objects  (I)

SA_API int SA_delete_user_objects ( tag_t  user_tag  ) 

Deprecated:
This function is deprecated and will be removed from TC2009. Use SA_delete_user instead.
Deletes the specified user's objects. This function provides a means to delete all the objects belonging to a user. If objects cannot be deleted because they are referenced by another user, then the object's ownership is changed to the current logged in user; this frees the user object for deletion. This function does not delete the User. You must call AOM_delete to delete the user.

Restrictions:

You must be the system administrator to call this function. Otherwise, returns an integer error code.

Parameters:
user_tag  (I)

SA_API int SA_extent_active_user ( int *  num_users,
tag_t **  user_tags 
)

This suppresses deactivated users from the list

Parameters:
num_users  (O)
user_tags  (OF) num_users

SA_API int SA_extent_user ( int *  nusers,
tag_t **  user_tags 
)

Allocates an array of tags and stores in the array all users in the database.

The client is responsible for deallocating the array of user_tags. Use MEM_free to free the memory pointed to by user_tags.

Parameters:
nusers  (O) Stores the size of the array
user_tags  (OF) nusers Points to the array of tags

SA_API int SA_find_user ( const char  userid[SA_user_size_c+1],
tag_t user_tag 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_find_user2
Finds a user with the specified user_id. The user_id is unique in the database. If the specified user_id does not exist, user_tag returns a NULLTAG. This ITK is NOT case sensitive in regards to userid.
Parameters:
userid  (I)
user_tag  (O)

SA_API int SA_find_user2 ( const char *  userid,
tag_t user_tag 
)

Finds a user with the specified user_id. The user_id is unique in the database. If the specified user_id does not exist, user_tag returns a NULLTAG. This ITK is NOT case sensitive in regards to userid.

Parameters:
userid  (I)
user_tag  (O)

SA_API int SA_find_user_objects ( tag_t  user_tag,
int *  num_of_objects,
tag_t **  object_tags 
)

Allocates an array of tags and stores in the array all tags of objects owned by the specified user.

The client is responsible for deallocating the array of object_tags. Use MEM_free to free the memory pointed to by object_tags.

Parameters:
user_tag  (I)
num_of_objects  (O) Stores the size of the array
object_tags  (OF) num_of_objects Points to the array of tags

SA_API int SA_get_mapped_user_attr_list ( int *  numberOfAttributes,
char ***  list 
)

Returns the list of mapped attributes for a user.

Parameters:
numberOfAttributes  (O)
list  (OF) numberOfAttributes

SA_API int SA_get_user_data_source ( const tag_t  user_tag,
int *  dataSource 
)

Returns the user data source.

Parameters:
user_tag  (I)
dataSource  (O)

SA_API int SA_get_user_last_sync_date ( const tag_t  user_tag,
date_t syncDate 
)

Returns the user last sync date.

Parameters:
user_tag  (I)
syncDate  (O)

SA_API int SA_get_user_status ( const tag_t  user_tag,
int *  status 
)

Returns the user status.

Parameters:
user_tag  (I)
status  (O)

SA_API int SA_initialize_user ( tag_t  userTag,
const char  userid[SA_user_size_c+1],
const char  personname[SA_person_name_size_c+1],
const char  password[SA_password_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_initialize_user2
Initializes a User object. It is not saved to the database until an explicit call to POM_save occurs. You must specify the user_id, person_name and password.

You normally use this function with a subclass of User. For example, if you defined a class special User, you would first call POM_create_instance to create the object in memory. Then you would use this function to initialize the attributes which were inherited from User. Finally, you would use additional POM calls to initialize the attributes comprising your specialization of User.

Restrictions:

This function is only valid when you are logged in as the system administrator.

Parameters:
userTag  (I)
userid  (I)
personname  (I)
password  (I)

SA_API int SA_initialize_user2 ( tag_t  userTag,
const char *  userid,
const char *  personname,
const char *  password 
)

Initializes a User object. It is not saved to the database until an explicit call to POM_save occurs. You must specify the user_id, person_name and password.

You normally use this function with a subclass of User. For example, if you defined a class special User, you would first call POM_create_instance to create the object in memory. Then you would use this function to initialize the attributes which were inherited from User. Finally, you would use additional POM calls to initialize the attributes comprising your specialization of User.

Restrictions:

This function is only valid when you are logged in as the system administrator.

Parameters:
userTag  (I)
userid  (I)
personname  (I)
password  (I)

SA_API int SA_set_os_user_name ( tag_t  userTag,
char  osUserName[SA_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_set_os_user_name2
Sets the operating system user name attribute of a Teamcenter Engineering user.
Parameters:
userTag  (I)
osUserName  (I)

SA_API int SA_set_os_user_name2 ( tag_t  userTag,
const char *  osUserName 
)

Sets the operating system user name attribute of a Teamcenter Engineering user.

Parameters:
userTag  (I)
osUserName  (I)

SA_API int SA_set_user_citizenships ( tag_t  user_tag,
int  num,
const char **  citizenships 
)

Sets user citizenships. If the number of citizenships is zero, it will empty user citizenships. Error SA_invalid_citizenship will returned if each citizenship is not two-letter string. Error PROP_invalid_object will be returned if user input tag is not valid User tag.

Parameters:
num  (I) The tag of the user to whom the citizenships are to be set
citizenships  (I) The number of citizenships. (I) Citizenships to be set to the user

SA_API int SA_set_user_data_source ( const tag_t  user_tag,
int  dataSource 
)

Sets the data source for the user

Parameters:
user_tag  (I)
dataSource  (I)

SA_API int SA_set_user_default_local_volume ( tag_t  user_tag,
const char  volume_name[SA_volume_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_set_user_default_local_volume2
Sets the default local volume name attribute of the user.

Restrictions:

You must be logged in as the owner or system administrator to set the default protections.

Parameters:
user_tag  (I)
volume_name  (I)

SA_API int SA_set_user_default_local_volume2 ( tag_t  user_tag,
const char *  volume_name 
)

Sets the default local volume name attribute of the user.

Restrictions:

You must be logged in as the owner or system administrator to set the default protections.

Parameters:
user_tag  (I)
volume_name  (I)

SA_API int SA_set_user_default_volume ( tag_t  user_tag,
const char  volume_name[SA_volume_name_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_set_user_default_volume2
Sets the default volume name attribute of the user.

Restrictions:

You must be logged in as the owner or system administrator to set the default protections.

Parameters:
user_tag  (I)
volume_name  (I)

SA_API int SA_set_user_default_volume2 ( tag_t  user_tag,
const char *  volume_name 
)

Sets the default volume name attribute of the user.

Restrictions:

You must be logged in as the owner or system administrator to set the default protections.

Parameters:
user_tag  (I)
volume_name  (I)

SA_API int SA_set_user_geography ( tag_t  userTag,
const char *  geography 
)

Sets the geography attribute of a Teamcenter user.

Parameters:
userTag  (I)
geography  (I)

SA_API int SA_set_user_gov_clearance ( tag_t  userTag,
const char *  gov_clearance 
)

Sets the Government clearance attribute of a Teamcenter user.

Parameters:
userTag  (I)
gov_clearance  (I)

SA_API int SA_set_user_identifier ( tag_t  user_tag,
const char  userid[SA_user_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use SA_set_user_identifier2
Sets the user identifier attribute of the user.
Parameters:
user_tag  (I)
userid  (I)

SA_API int SA_set_user_identifier2 ( tag_t  user_tag,
const char *  userid 
)

Sets the user identifier attribute of the user.

Parameters:
user_tag  (I)
userid  (I)

SA_API int SA_set_user_ip_clearance ( tag_t  userTag,
const char *  ip_clearance 
)

Sets the IP (Intellectual Property) clearance attribute of a Teamcenter user.

Parameters:
userTag  (I)
ip_clearance  (I)

SA_API int SA_set_user_last_sync_date ( const tag_t  user_tag,
date_t  syncDate 
)

Sets the data source for the user

Parameters:
user_tag  (I)
syncDate  (I)

SA_API int SA_set_user_license_status ( tag_t  user_tag,
int  user_status,
int  license_level,
const char *  license_bundle,
int *  purchased,
int *  used,
int *  purchased_bundles,
int *  used_bundles 
)

Sets the license level, license bundle and status of the desired user. The caller must be a Teamcenter system administrator. The number of purchased and used licenses for the specified license_level and license_bundle are returned.
Valid values for the license level are:

  • 0: author
  • 1: consumer
  • 2: occasional user
  • 3: viewer

Valid values for the user status are:
  • 0: active
  • 1: inactive

The license bundle should be a valid bundle name or null value


Returned error values are:

Parameters:
user_tag  (I) Tag of an existing user
user_status  (I) Status to grant to the user
license_level  (I) License level to grant to the user
license_bundle  (I) License bundle to grant to the user
purchased  (O) Number of purchased licenses
used  (O) Number of used licenses
purchased_bundles  (O) Number of purchased bundles
used_bundles  (O) Number of used bundles

SA_API int SA_set_user_login_group ( tag_t  user_tag,
tag_t  group_tag 
)

Sets the default login group attribute of the user.

Parameters:
user_tag  (I)
group_tag  (I)

SA_API int SA_set_user_nationality ( tag_t  userTag,
const char *  nationality 
)

Sets the nationality attribute of a Teamcenter user.

Parameters:
userTag  (I)
nationality  (I)

SA_API int SA_set_user_person ( tag_t  user_tag,
tag_t  person_tag 
)

Sets the person attribute of the user.

Parameters:
user_tag  (I)
person_tag  (I)

SA_API int SA_set_user_status ( const tag_t  user_tag,
int  newStatus 
)

Sets the user status.

Parameters:
user_tag  (I)
newStatus  (I)

SA_API int SA_set_user_ttc_date ( tag_t  userTag,
date_t  ttc_date 
)

Sets the ttc_date (technology transfer certification date) attribute of a Teamcenter user.

Parameters:
userTag  (I)
ttc_date  (I)