Skip to content

Is it necessary to load and save the current user 4 times? #85

@BK-Teisrud

Description

@BK-Teisrud

In today's implementation, the current user is stored in UserViewModel and retrieved from the QuickFeed server when a user logs in to the application. When the user selects a course he is a student in, StudentViewModel will retrieve the current user from the server. The same will happen with TeacherViewModel if the user is a teacher in a course. If the user also has administrator rights, the current user will also be retrieved via AdminViewModel.

This means that the current user can in the worst case be retrieved from the server 4 times. And then also be stored four different places. If a user is to be changed, the user must be changed in 4 different places.

Is there a way where the current user is only retrieved to UserViewModel and the other ViewModels retrieve the current user from UserViewModel? With such a way, we will only need to treat one user rather than 2, 3 or 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions