Editing users in an existing research project#

In order to edit research project, business key is needed from Tutkimusmoniviestin to map messages to the right project. All projects user is owner in can be retrieved with their business keys using list-projects:start message. Additionally, the Vasara proccess used to create the project can directly use user management messages after project setup is fully completed, using the same business key used to create the project.

../../_images/project-user-management-flow.svg

Listing editable projects#

List editable projects#

Message sent from Vasara to Tutkimusmoniviestin to list projects user is owner in.

properties

  • messageName

Vasara:OSC:MVRE:list-projects:start

  • inputParameters

properties

  • editor

User to search projects for

type

string

examples

erkesimerk@jyu.fi

Lists all research projects editor is owner in. Only includes fully setup projects, so projects with unfinished creation process are not included. If there are no errors in input parameter format, projects-listed message is sent with a JSON list of the projects.

Projects listed succesfully#

Message sent from Tutkimusmoniviestin to Vasara if projects are listed successfully.

properties

  • messageName

MVRE:OSC:Vasara:projects-listed

  • outputParameters

properties

  • projects

Projects as a JSON list

type

array

items

project_

project#

properties

  • title

Project title

type

string

  • businessKey

Business key used to map messages to this project.

type

string

Message sent after successfull list-projects:start message, containing a JSON list of all the projects editor is owner in.

Listing projects failed#

Message sent from Tutkimusmoniviestin to Vasara if listing projects fails.

properties

  • messageName

MVRE:OSC:Vasara:list-projects-error

  • outputParameters

properties

  • errorCode

Code defining the error type

type

string

enum

invalidFormat

  • errorMessage

Message describing the error

type

string

Message sent if there are format errors in list-projects:start input parameters.

Listing users in a project#

List project users#

Message sent from Vasara to Tutkimusmoniviestin to list users in a project.

properties

  • messageName

Vasara:OSC:MVRE:project-list-users

  • inputParameters

properties

  • editor

Owner searching users

type

string

examples

erkesimerk@jyu.fi

Lists all users in a project. Only project owners can list the users. If there are no errors, project-users-listed message is sent with a JSON list of users in the project.

Project users listed succesfully#

Message sent from Tutkimusmoniviestin to Vasara if project users are listed successfully.

properties

  • messageName

MVRE:OSC:Vasara:project-users-listed

  • outputParameters

properties

  • users

Users as a JSON list

type

array

items

user_

user#

properties

  • username

JYU email in short format

type

string

examples

erkesimerk@jyu.fi

  • expires

User expiration date in the project in Camunda format

type

string

examples

2028-12-31T23:59:59.000+0000

  • isOwner

Is the user a owner in the project.

type

boolean

Message containing a list of all project users, sent after successfull project-list-users message.

Listing project users failed#

Message sent from Tutkimusmoniviestin to Vasara if listing project users fails.

properties

  • messageName

MVRE:OSC:Vasara:project-list-error

  • outputParameters

properties

  • errorCode

Code defining the error type

type

string

enum

invalidFormat, setupIncomplete, permissionDenied

  • errorMessage

Message describing the error

type

string

Error code setupIncomplete is used, if the project creation process is still incomplete. Listed projects include only correctly setup projects. Error code permissionDenied means user is not a project owner. Error code invalidFormat means there are errors in the given input parameters.

Editing users#

Add or edit project users#

Message sent from Vasara to Tutkimusmoniviestin to add or edit project users.

properties

  • messageName

Vasara:OSC:MVRE:project-edit-users

  • inputParameters

properties

  • editor

Owner editing users

type

string

examples

erkesimerk@jyu.fi

  • users

JSON list of users to add or edit.

type

array

items

user_

user#

type

object

properties

  • username

JYU email in short format

type

string

examples

erkesimerk@jyu.fi

  • expires

User expiration date in the project in Camunda format

type

string

examples

2028-12-31T23:59:59.000+0000

  • isOwner

Is the user a owner in the project.

type

boolean

Adds or edits users in a project if editor is a project owner. All users not yet in the project are added, and existing users are changed. To avoid ownerless projects and owner extending their own expiration time, editor can’t edit themselves. In order to edit a project owner, another user must first be added to owners, and that user can then edit the original owner.

Project users edited succesfully#

Message sent from Tutkimusmoniviestin to Vasara if project users are edited successfully.

properties

  • messageName

MVRE:OSC:Vasara:project-users-changed

Editing project users failed#

Message sent from Tutkimusmoniviestin to Vasara if editing project users fails.

properties

  • messageName

MVRE:OSC:Vasara:project-edit-error

  • outputParameters

properties

  • errorCode

Code defining the error type

type

string

enum

invalidFormat, setupIncomplete, permissionDenied, illegalEdit

  • errorMessage

Message describing the error

type

string

Error code setupIncomplete is used, if the project creation process is still incomplete. Listed projects include only correctly setup projects. Error code illegalEdit means user is trying to edit themselves. Error code permissionDenied means user is not a project owner. Error code invalidFormat means there are errors in the given input parameters.

Removing users#

Remove project users#

Message sent from Vasara to Tutkimusmoniviestin to remove project users.

properties

  • messageName

Vasara:OSC:MVRE:project-remove-users

  • inputParameters

properties

  • editor

Owner removing users

type

string

examples

erkesimerk@jyu.fi

  • users

JSON list of users remove.

type

array

items

user_

user#

properties

  • username

JYU email in short format

type

string

examples

erkesimerk@jyu.fi

Removes users from a project if editor is a project owner. To avoid ownerless projects, editor can’t remove themselves. In order to remove project owner, another user must first be added to owners, and that user can then remove the original owner.

Project users removed succesfully#

Message sent from Tutkimusmoniviestin to Vasara if project users are removed successfully.

properties

  • messageName

MVRE:OSC:Vasara:project-users-removed

Removing project users failed#

Message sent from Tutkimusmoniviestin to Vasara if removing project users fails.

properties

  • messageName

MVRE:OSC:Vasara:project-remove-error

  • outputParameters

properties

  • errorCode

Code defining the error type

type

string

enum

invalidFormat, setupIncomplete, permissionDenied, illegalEdit

  • errorMessage

Message describing the error

type

string

Error code setupIncomplete is used, if the project creation process is still incomplete. Listed projects include only correctly setup projects. Error code illegalEdit means user is trying to remove themselves. Error code permissionDenied means user is not a project owner. Error code invalidFormat means there are errors in the given input parameters.