There are two kind of User in Cytomine: human user (User) and software user (UserJob). Each of them extends the SecUser class. Each user has some roles (SecRole) and some permissions on domain instances.
To have more details about permissions, check the permission guide.
Package main classes
Human user. Extend SecUser class
Software user. Extend SecUser class
A user role (admin, user,...)
A link between a user and a role
A set of user
A user in a group
User and UserJob extends SecUser. User and UserJob are able to login to Cytomine. When a user run a job, this will create a new UserJob with the same user role.
A human user connects to the server with a login/password form.
The form will POST data to the /j_spring_security_check service (from Spring Security plugin).
A software user (UserJob) will use a client and will log thanks to public and private keys by generating a signature.
The main code is located in APIAuthentificationFilters.tryAPIAuthentification(). This method will check if the signature is valid.
There are 4 kinds of user:
- Guest (ROLE_GUEST): This is the lowest role. A guest cannot create project, ontologies, … and has some specific restriction inside a project. Useful for students (context of education) or demo.
- User (ROLE_USER): A simple user allowing to create project and ontologies.
- Admin (ROLE_ADMIN): An admin has access to all data and may modify all data. This is a role to manage the platform. By default, an admin is connected as a user. The user must open an “admin session” to be a real admin.
- SuperAmdin (ROLE_SUPER_ADMIN): Same as admin, but everytime connected as an admin (not need to open “admin session”). Useful for external software user that needs the admin role.
The service CurrentRoleService is session scope service containing some interresting methods:
A user with ROLE_ADMIN may open the Admin session on the web app.
This service calls the activeAdminSession method.
This user will now be logged as an admin. He may the close its admin session.
This service calls the closeAdminSession.
An admin user is able to be connected as another user.
This functionnality simply calls the /j_spring_security_switch_user service (with POST param: j_username:"xxx").