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

Group Member
[System Administration]


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

Functions


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_tag,
logical  includeInactive,
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. Group members are filtered on the basis of includeInactive flag.It consider all( active and inactive) group members if includeInactive flag is true, otherwise consider only active group members. 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) User tag references the group members
includeInactive  (I) A boolean flag which filters the active, inactive group members
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_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)