ITK Function Reference

(V10000.1.0.60_20160308.00)
Functions

Functions

SA_API int SA_ask_current_groupmember (tag_t *current_groupmember_tag)
 
SA_API int SA_ask_default_role (tag_t user_tag, tag_t group_tag, tag_t *role_tag)
 
SA_API int SA_ask_groupmember_group (tag_t member_tag, tag_t *group_tag)
 
SA_API int SA_ask_groupmember_group_priv (tag_t member_tag, logical *group_admin_flag)
 
SA_API int SA_ask_groupmember_inactive (tag_t groupmember_tag, logical *is_deactivated)
 
SA_API int SA_ask_groupmember_role (tag_t member_tag, tag_t *role_tag)
 
SA_API int SA_ask_groupmember_user (tag_t member_tag, tag_t *user_tag)
 
SA_API int SA_create_groupmember (tag_t group_tag, tag_t user_tag, logical group_admin_flag, tag_t *member_tag)
 
SA_API int SA_extent_active_groupmember (int *num_of_activegroupmembers, tag_t **member_tags)
 
SA_API int SA_extent_groupmember (int *num_of_groupmembers, tag_t **member_tags)
 
SA_API int SA_find_all_groupmember_by_user (tag_t user, logical include_inactive, int *num_of_members, tag_t **members)
 
SA_API int SA_find_group_members (const char *group_name, const char *role_name, const char *user_id, const char *user_name, logical include_inactive, logical include_subgroups, int *number_found, tag_t **members, tag_t **groups, tag_t **roles, tag_t **users)
 
SA_API int SA_find_groupmember_by_role (tag_t role_tag, tag_t group_tag, int *num_of_members, tag_t **member_tags)
 
SA_API int SA_find_groupmember_by_rolename (const char *role_name, const char *group_name, const char *user_id, int *number_found, tag_t **list)
 
SA_API int SA_find_groupmember_by_user (tag_t user_tag, int *num_of_members, tag_t **member_tags)
 
SA_API int SA_find_groupmembers (tag_t user_tag, tag_t group_tag, int *n_members, tag_t **member_tags)
 
SA_API int SA_find_groupmembers_by_accessor (tag_t accessor, int *num_of_members, tag_t **member_tags)
 
SA_API int SA_find_groupmembers_by_group (tag_t group_tag, int *num_of_members, tag_t **member_tags)
 
SA_API int SA_initialize_groupmember (tag_t member_tag, tag_t group_tag, tag_t user_tag, logical group_admin_flag)
 
SA_API int SA_is_groupmember_default_role (tag_t groupmember_tag, logical *is_default_role)
 
SA_API int SA_set_default_role (tag_t user_tag, tag_t group_tag, tag_t role_tag)
 
SA_API int SA_set_groupmember_group (tag_t member_tag, tag_t group_tag)
 
SA_API int SA_set_groupmember_group_priv (tag_t member_tag, logical group_admin_flag)
 
SA_API int SA_set_groupmember_inactive (tag_t groupmember_tag, logical deactivate)
 
SA_API int SA_set_groupmember_role (tag_t member_tag, tag_t role_tag)
 
SA_API int SA_set_groupmember_user (tag_t member_tag, tag_t user_tag)
 

Detailed Description

Note
  1. If the login user is NOT a System Administrator or a Group Administrator, then these functions find and return only active groupmembers.
  2. If the login user is a System Administrator or a Group Administrator and the preference TC_suppress_inactive_group_members is set to 1, then these functions find and return only active groupmembers.
  3. If the login user is a System Administrator or a Group Administrator and the preference TC_suppress_inactive_group_members is set to 0, then these functions find and return both active and inactive groupmembers.

These functions may return members that are inactive users; call SA_find_groupmembers_by_accessor if you are only interested in active users

Function Documentation

SA_API int SA_ask_current_groupmember ( tag_t current_groupmember_tag)

Returns the current groupmember tag of the logged in user. This is the groupmember that relates the user to his/her current group via his/her current role.

Restrictions:

You can only access these functions when logged in as a system or group administrator.

Parameters
current_groupmember_tag(O)
SA_API int SA_ask_default_role ( tag_t  user_tag,
tag_t  group_tag,
tag_t role_tag 
)

This function returns the default role in a group for a specified user. If the default role is not defined, a null tag will be returned.

Parameters
user_tag(I) Tag of the user to find a role for
group_tag(I) Group to find the role in
role_tag(O) Default role tag
SA_API int SA_ask_groupmember_group ( tag_t  member_tag,
tag_t group_tag 
)

Returns the group tag attribute for this group member.

Parameters
member_tag(I)
group_tag(O)
SA_API int SA_ask_groupmember_group_priv ( tag_t  member_tag,
logical group_admin_flag 
)

Returns the group administration attribute for this group member. The group_admin_flag attribute indicates if the group member is to be the group administrator (true for group administrator, false if not).

Parameters
member_tag(I)
group_admin_flag(O)
SA_API int SA_ask_groupmember_inactive ( tag_t  groupmember_tag,
logical is_deactivated 
)

Returns a variable which indicates whether the status of the groupmember is inactive or active.

Restrictions:

You can only access this function when logged in as a system or group administrator.

Parameters
groupmember_tag(I)
is_deactivated(O)
SA_API int SA_ask_groupmember_role ( tag_t  member_tag,
tag_t role_tag 
)

Returns the role tag attribute for this group member.

Parameters
member_tag(I)
role_tag(O)
SA_API int SA_ask_groupmember_user ( tag_t  member_tag,
tag_t user_tag 
)

Returns the user tag attribute for this group member.

Parameters
member_tag(I)
user_tag(O)
SA_API int SA_create_groupmember ( tag_t  group_tag,
tag_t  user_tag,
logical  group_admin_flag,
tag_t member_tag 
)

Creates a GroupMember object. It is not saved to the database until an explicit call to AOM_save is made. You must specify a member_tag, group_tag, user_tag, and the group administration attributes.

The group_admin_flag attribute indicates if the group member is to be the group administrator (true for group administrator, false if not). Setting the group administrator attribute to true without having system administration privileges results in an error.

Restrictions:

You can only access this function when logged in as a system or group administrator.

Parameters
group_tag(I)
user_tag(I)
group_admin_flag(I)
member_tag(O)
SA_API int SA_extent_active_groupmember ( int *  num_of_activegroupmembers,
tag_t **  member_tags 
)

Allocates an array of tags and stores in the array all active groupmembers in the database. The client is responsible for deallocating the array of member_tags. Use MEM_free to free the memory pointed to by member_tags.

Parameters
num_of_activegroupmembers(O) Stores the size of the array
member_tags(OF) num_of_activegroupmembers Points to the array of tags
SA_API int SA_extent_groupmember ( int *  num_of_groupmembers,
tag_t **  member_tags 
)

Allocates an array of tags and stores in the array all groupmembers in the database. The client is responsible for deallocating the array of member_tags. Use MEM_free to free the memory pointed to by member_tags.

Parameters
num_of_groupmembers(O) Stores the size of the array
member_tags(OF) num_of_groupmembers Points to the array of tags
SA_API int SA_find_all_groupmember_by_user ( tag_t  user,
logical  include_inactive,
int *  num_of_members,
tag_t **  members 
)

Retrieves all the group members which are referenced by the specified user.
Group members are filtered on the basis of the include_inactive flag.

Returns
Parameters
user(I) User tag references the group members
include_inactive(I) Filters the active/inactive group members.
Valid values are:
  • true: all (active and inactive) group members are retrieved.
  • false: only active group members are retrieved.
num_of_members(O) The number of values in members array
members(OF) num_of_members The array of tags
SA_API int SA_find_group_members ( const char *  group_name,
const char *  role_name,
const char *  user_id,
const char *  user_name,
logical  include_inactive,
logical  include_subgroups,
int *  number_found,
tag_t **  members,
tag_t **  groups,
tag_t **  roles,
tag_t **  users 
)

Finds group members with given group name, role name, user ID and user name.
At least one of the four input criteria should not be empy. If both the user ID and the user name are specified, the group members that match either the user ID or the user name are returned.

Note
The entries in the parameters group_name, role_name, user_id and user_name are case-insensitive and support the use of the wildcard character as defined by the preference "TC_pattern_match_style".
Returns
Parameters
group_name(I) The group name of the group members.
role_name(I) The role name of the group members.
user_id(I) The user ID of the group memebrs.
user_name(I) The user name of the group members.
include_inactive(I) Flag to include inactive group members in the search.
include_subgroups(I) Flag to include group members from subgroups of matching groups in the search.
number_found(O) The number of group members
members(OF) number_found Found group members
groups(OF) number_found Corresponding groups
roles(OF) number_found Corresponding roles
users(OF) number_found Corresponding users
SA_API int SA_find_groupmember_by_role ( tag_t  role_tag,
tag_t  group_tag,
int *  num_of_members,
tag_t **  member_tags 
)

Allocates an array of tags and stores in the array all group members of a given group and role tag. member_tags points to the array of tags. num_of_members stores the size of the array. The client is responsible for deallocating the array of member_tags. Use MEM_free to free the memory pointed to by member_tags.

Parameters
role_tag(I)
group_tag(I)
num_of_members(O)
member_tags(OF) num_of_members
SA_API int SA_find_groupmember_by_rolename ( const char *  role_name,
const char *  group_name,
const char *  user_id,
int *  number_found,
tag_t **  list 
)

Locates group member objects. The caller may find the group members by role, group, user, or any combination of the input parameters as shown in the synopsis. As a result, this function passes the number of members found and an array of member tags. It is the caller's responsibility to free the returned tags.

The following are some examples of how this function may be used:

  • To find members of a group with a certain role, the caller must provide the group name and the role name to this function as a searching criteria. For the user_id parameter, the caller may enter a NULL string.
  • To verify a user is a member of a group and having a certain role, the caller must provide the group_name, the role_name, and the user_id. If in fact, there is such a member, the function will return number_found and a list of members tags.
Parameters
role_name(I) NULL allowed
group_name(I) NULL allowed
user_id(I) NULL allowed
number_found(O)
list(OF) number_found
SA_API int SA_find_groupmember_by_user ( tag_t  user_tag,
int *  num_of_members,
tag_t **  member_tags 
)

Allocates an array of tags and stores in the array all group members who reference the specified user. The client is responsible for deallocating the array of member_tags. Use MEM_free to free the memory pointed to by member_tags.

Parameters
user_tag(I)
num_of_members(O) Stores the size of the array
member_tags(OF) num_of_members Points to the array of tags
SA_API int SA_find_groupmembers ( tag_t  user_tag,
tag_t  group_tag,
int *  n_members,
tag_t **  member_tags 
)

Finds all groupmembers with the specified group and user tags. If an error occurs, then a non-zero integer returns. If no GroupMember exists with the specified group and user tags, then a zero returns and a NULLTAG is given for the groupmember tag.

Parameters
user_tag(I)
group_tag(I)
n_members(O)
member_tags(OF) n_members
SA_API int SA_find_groupmembers_by_accessor ( tag_t  accessor,
int *  num_of_members,
tag_t **  member_tags 
)

Allocates an array of tags and stores in the array all groupmembers associated with the particular accessor tag. This accessor may be a user, a group, or a role.

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

Parameters
accessor(I)
num_of_members(O) Stores the size of the array
member_tags(OF) num_of_members Points to the array of tags
SA_API int SA_find_groupmembers_by_group ( tag_t  group_tag,
int *  num_of_members,
tag_t **  member_tags 
)

Allocates an array of tags and stores in the array all group members of the specified group. The client is responsible for deallocating the array of member_tags. Use MEM_free to free the memory pointed to by member_tags.

Parameters
group_tag(I)
num_of_members(O) Stores the size of the array
member_tags(OF) num_of_members Points to the array of tags
SA_API int SA_initialize_groupmember ( tag_t  member_tag,
tag_t  group_tag,
tag_t  user_tag,
logical  group_admin_flag 
)

Initializes a GroupMember object. It is not saved to the database until an explicit call to POM_save occurs. You must specify the member_tag, group_tag, user_tag and the group administration attributes. The group_admin_flag attribute indicates if the group member is to be the group administrator (true for group administrator, false if not). Setting the group administrator attribute to true without having system administration privileges results in an error.

You normally use this function with a subclass of GroupMember. For example, if you defined a class special GroupMember, 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 GroupMember. Finally, you would use additional POM calls to initialize the attributes comprising your specialization of GroupMember.

Restrictions:

You can only access this function when logged in as a system or group administrator.

Parameters
member_tag(I)
group_tag(I)
user_tag(I)
group_admin_flag(I)
SA_API int SA_is_groupmember_default_role ( tag_t  groupmember_tag,
logical is_default_role 
)
Parameters
groupmember_tag(I)
is_default_role(O)
SA_API int SA_set_default_role ( tag_t  user_tag,
tag_t  group_tag,
tag_t  role_tag 
)

This function sets the default role in a group for a specified user.

Parameters
user_tag(I) user tag
group_tag(I) group tag
role_tag(I) default role tag
SA_API int SA_set_groupmember_group ( tag_t  member_tag,
tag_t  group_tag 
)

Sets the group_tag attribute for the group member.

Parameters
member_tag(I)
group_tag(I)
SA_API int SA_set_groupmember_group_priv ( tag_t  member_tag,
logical  group_admin_flag 
)

Sets the group_admin_flag attribute for the group member. The group_admin_flag attribute indicates if the group member is to be the group administrator (true for group administrator, false if not). Setting the group_admin_flag attribute to true without having system administration privileges returns an integer error code.

Parameters
member_tag(I)
group_admin_flag(I)
SA_API int SA_set_groupmember_inactive ( tag_t  groupmember_tag,
logical  deactivate 
)

Sets the status of the input groupmember to active or inactive.

Restrictions:

You can only access this function when logged in as a system or group administrator.

Parameters
groupmember_tag(I)
deactivate(I)
SA_API int SA_set_groupmember_role ( tag_t  member_tag,
tag_t  role_tag 
)

Sets the role_tag attribute for the group member.

Restrictions:

You can only access these functions when logged in as a system or group administrator.

Parameters
member_tag(I)
role_tag(I)
SA_API int SA_set_groupmember_user ( tag_t  member_tag,
tag_t  user_tag 
)

Sets the user_tag attribute for the group member.

Parameters
member_tag(I)
user_tag(I)