The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tivoli::AccessManager::Admin::User - Perl extension for TAM Admin API

SYNOPSIS

  use Tivoli::AccessManager::Admin;

  # Connect to the policy server as sec_master
  my $pdadmin = Tivoli::AccessManager::Admin->new('sec_master', 'password');

  # Get the user with the ID joe and print basic information
  my $user = $pdadmin->get_user('joe');
  print 'Login ID: ', $user->id, "\n";
  print 'Login CN: ', $user->cn, "\n";
  print 'Login DN: ', $user->dn, "\n";

  if ( $user->valid ) {
        print "User account valid.\n";
  } else {
        # Make the user account valid
        $user->valid(1);
  }

  # Make the user a Non-GSO user
  $user->gso(0);

DESCRIPTION

Tivoli::AccessManager::Admin::User is a support module for the Tivoli::AccessManager::Admin module.

METHODS

id

Return the TAM ID of the user.

cn

Return the LDAP CN of the user.

sn

Return the LDAP SN of the user.

dn

Returns the LDAP DN of the user.

description(<description>)

Return the current description of the user. The method will set the description to the value of the first parameter, if passed.

valid(<valid>)

Returns true if the account is currently valid. The method will also set the account validity of the user if 1 (valid) or 0 (invalid) is passed as an argument.

gso(<valid>)

Returns true if the account is a GSO user. The method will also set the GSO state of the user if 1 (GSO user) or 0 (non-GSO user) is passed as an argument.

remove

Remove the user from TAM only. This method is equivalent to the following pdadmin command.

   pdadmin> user delete <userid>

delete

Remove the user from TAM and LDAP. This method is equivalent to the following pdadmin command.

   pdadmin> user delete -registry <userid>

ok

Returns true if the last action was successful.

error

Returns true if the last action was unsuccessful.

message([<index>])

Returns the error message for the last action. The index will specify which error message to return if the last action resulted in more that one error condition. The index is 0 based.

code([<index>])

Returns the error code for the last action. The index will specify which error code to return if the last ction resulted in more that one error condition. The index is 0 based.

msg_count

Returns the number of errors generated for the last action.

AUTHOR

George Chlipala, george@walnutcs.com

SEE ALSO

perl(1).