Skip to content

Commit

Permalink
Merge pull request #316 from graasp/218/docs
Browse files Browse the repository at this point in the history
docs: add login and user mode docs
  • Loading branch information
pyphilia authored Aug 31, 2020
2 parents 82a8d55 + 05235fb commit ba4627a
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/authentication/authenticaton-proposals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# User Authentication

Since Graasp Desktop v.0.15.4, a user authentication is available in order for multiple users to use the application.

![Login Screen](./img/loginScreen.png)

The authentication process is triggered right at the launch of the application. It asks for a username before allowing access to the application. Each new username will create a corresponding user account on the fly. If a username already exists in the database, the user will sign in with the corresponding account and be able to access previously stored data.

One can use the application anonymously without restriction, but any saved data will not be retrievable after the user closes the session.

In order to automatically authenticate whenever the application is launched, the
current user session is stored in a dedicated part of the local storage and is used to sign
in. When the user signs out, the cached session is cleared and the application redirects
to the login screen.

## Alternative solution: Space-level Authentication (online)

Graasp offers a practical method for students to access spaces. From a link, before accessing a space, students create personal credentials, resulting in a Light account. This account allows to save data for this student for this space only.

If online data from Light users are required in Graasp Desktop, it is necessary to implement a authentication procedure triggered each time a space is visited.

However, as of today's requirements, Graasp Desktop is used in poorly connected countries. Trying to fetch data online is thus not necessary. Additionally, authenticating at a space-level is rather tedious and tends to be repetitive in a context where the user only consumes and visits spaces. Security should also be handled with high precautions.

The following schema depicts a proposed space-level login. Blue steps run while online, whereas grey steps are performed in an offline environment. If online, the application connects to and fetch the online account user data. If offline, the application skips the online procedure and immediately access the space.

![Space-level Authentication Flowchart](./img/spaceLevelAuthentication.png)
Binary file added docs/authentication/img/loginScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions docs/authentication/userMode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# User Modes

Though different user accounts can be created to access the application and save personal data, spaces are shared among all the users. To handle these spaces (avoid unexpected action on other users), we divide users into different categories/modes/stakeholders, leading to different permissions.

## Stakeholders in Graasp Desktop

### Teachers

Teachers need to manage spaces (as they can online) and their students. Assuming that
spaces are exclusively created and edited on the main online platform, Graasp Desktop
is primarily a common pedagogical course support to provide the spaces to their classes
in an offline context.
Additionally, teachers use Graasp Desktop to gather and browse their students’ data in
order to gain insight of their progression throughout the courses, as well as to
eventually correct their submissions.

### Students

Students use Graasp Desktop to learn in offline environments, either during classes or
remotely at home. They visit spaces created by their teacher, and might also visit other
interesting spaces if they have a stable internet connection. Additionally, students
eventually save resources and leave activity traces while visiting spaces. Such data
results in interesting analytics of their learning sessions, that students can display to
evaluate their learning progression. Finally, students share their resources with their
friends or teachers in order to be evaluated.

### Developers

Even though they are not directly related to the pedagogical purpose of the
application, developers are necessary in order to maintain and improve the
functionalities of the Graasp Desktop application. For instance, they need full access to
the database and to all the application’s features, as well as particular development
tools to implement new features.

### Researchers

Graasp Desktop is an educational support to collect meaningful data from learners,
and researchers can use it to conduct their studies. They require specific applications
to track the users, as well as a mechanism to manage consent from users to have legal
access to their data.
While Developers and Researchers also have their importance in the development of
Graasp Desktop and could have their own modes, as part of this thesis, we only focus
on teacher and student differences in order to develop a teacher mode.

| Action | Student | Teacher |
| :-------------------------: | :------: | :------------------------------: |
| Visit a Space | yes | yes |
| Export a Space | yes | yes |
| Save a Space | no | yes |
| Add a Space | no | yes |
| Delete a Space | no | yes |
| Sync a Space | no | yes |
| Load a Space | no | yes |
| Load Space's data | no/yes\* | yes |
| Classrooms Functionalities | no | yes |
| Displayed data in Dashboard | own data | own and other users' shared data |

<center>*Student*'s and *Teacher*'s permissions comparison</center>

## Implementation

Since Graasp Desktop 0.15.4, the _Student_ and _Teacher_ modes are available. By default, a user is a _Student_. To become a _Teacher_, the setting **Student Mode** should be disabled in the settings. _Developer_ and _Research_ are not yet available.

0 comments on commit ba4627a

Please sign in to comment.