Assigned Person

Assigned Person is a relationship between a person (SimDM user) and specified node. The assignment could be used to change default access rights of a person to the node and its content (in case administrator, manager, editor, reader type of the assignment). Such assignment has highest priority in access to the node (lower priority has access level coming from person's group/organization assignment to the node, even less access level inherited from parent node, from default type of person and person's group/organization)

assigned_person_list_types

returns list of all possible types of the person assignments for the specified node

QUERY_FUNCTION assigned_person_list_types(id: INTEGER): LIST OF STRING

Parameter:
id (optional) assigning node instance id

assigned_person_create

assigns person to node in current state of pbs according to input. Assigned person gets access rights specified by the assignment role (type) or (if unset) by the person's default role

To call the query logged in user shall be associated with a person granted with administrative privileges over the target node (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION assigned_person_create(subj: v_assigned_person): v_assigned_person

Parameter:
subj input for the assignment, see v_assigned_person
some attributes of the input are ignored, like the following:
  • subject.item.instance_id - generated
  • subject.item.cancelled - set to FALSE
  • subject.item.creator - set to logged in user
  • subject.item.last_changed - set to date/time of the call
  • subject.item.last_editor - set to logged in user
  • subject.item.comments - unset
  • subject.item.events - is populated with a creation event

Returns actual attributes of the newly assigned person (see v_assigned_person)


assigned_person_get

gets data of a person assignment specified by its instance id

To call the query logged in user shall be associated with a person granted with reader privileges over the target node (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION assigned_person_get(id: INTEGER): v_assigned_person

Parameter:
id id of the assigned person instance

Returns actual data of the required assigned person (see v_assigned_person)


assigned_person_list

lists data of assignments specified by list of their instance id-s. Normally source of the the list is v_node returned by node_get

To call the query logged in user shall be associated with a person granted with reader privileges in target node (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION assigned_person_list(ids: LIST OF INTEGER): LIST OF v_assigned_person

Parameter:
ids list of interesting assigned person instance id-s

Returns list of actual data of the required assigned persons (see v_assigned_person)


assigned_person_select

assigned persons search is not implemented in current realize
QUERY_FUNCTION assigned_person_select(
      node,
      person,
      creator           : INTEGER;
      before,
      after             : STRING;
      person_type,
      assignment_type   : STRING)  :  LIST OF v_assigned_person
Parameters:
node (optional) instance id of assigning node
person (optional) instance id of assigned person
creator (optional) instance id of simdm person who introduced the assignments
before (optional) later date/time of the assignment in format "YYYY/MM/DD hh:mm:ss"
after (optional) earlier date/time of the assignment in format "YYYY/MM/DD hh:mm:ss"
person_type (optional) type of person definition
assignment_type (optional) type of person assignment

Returns list of found assigned properties (see v_assigned_person)


assigned_person_update

updates data of assigned person. The assignment is specified by its instance id

To call the query logged in user shall be associated with a person granted with administrative privileges over the node of the assignment (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION assigned_person_update(subject: v_assigned_person): v_assigned_person

Parameter:
subject updated data of the assignment to be updated in model (see v_assigned_person).
Target instance is specified by subject.item.instance_id

The following attributes are ignored:

  • subject.domain - is leaved in parent node
  • subject.item.introduced - is leaved as before
  • subject.item.creator - is leaved as before
  • subject.item.last_changed - set to current date/time
  • subject.item.last_editor - set to calling user
  • subject.item.comments - is leaved as before
  • subject.item.event - is added with update event

Returns actual data of the updated assigned person (see v_assigned_person)


assigned_person_delete

removes assignment specified by its instance id from the current state of pbs

To call the query logged in user shall be associated with a person granted with administrative privileges over node of the assignment (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION assigned_person_delete(id: INTEGER): v_assigned_person

Parameter:
id instance id of the assignment to be removed

Returns TRUE

Back to Home page