Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return only user properties when actually needed #138

Closed
Brend-Smits opened this issue May 21, 2020 · 4 comments · Fixed by #153
Closed

Return only user properties when actually needed #138

Brend-Smits opened this issue May 21, 2020 · 4 comments · Fixed by #153
Assignees
Labels
input wanted Open to discussion, input wanted. priority Only assign this label if it's asked to assign this label

Comments

@Brend-Smits
Copy link
Member

We need to be careful with returning users when requesting for example all projects. I recommend we look into all endpoints and check carefully what we are returning. In some cases only an ID would be sufficient to return, in others we do need a name.
I noticed we are returning email addresses when calling 'Get all projects" or "Project Detail" page.
There might be more endpoints that are accessible by Guests / Registered users that are able to get information that they should not be able to see so easily.

What needs to be done?

  1. Go over all endpoints that return something from a users
  2. Check if it's actually needed to return the information about the user in that endpoint
  3. If necessary, make the appropriate changes to only return the information needed

Might need to discuss this a little bit more, perhaps Guests should not be able to see the user's email and Registered users should be able to? Github has a setting for this in the profile section where you can control who sees your email (guest vs registered users). What does @DigitalExcellence/backend think?

@Brend-Smits Brend-Smits added this to To do in Sprint 4 - Backend via automation May 21, 2020
@Brend-Smits Brend-Smits added the input wanted Open to discussion, input wanted. label May 21, 2020
@StijnGroenen
Copy link
Member

I think that the user e-mail addresses should only be displayed when the user has explicitly turned on an option to display the e-mail address on his / her profile. By default it should not show e-mail addresses.

@JVerbruggen
Copy link
Member

Why return all this info if you can only return an id? or secret id? then only users with rights to view the user's data can get it in another request.

@Brend-Smits Brend-Smits added the priority Only assign this label if it's asked to assign this label label May 26, 2020
@wotwot563
Copy link

I agree in the public private option.

The main reason for this is that when you cannot search for a user who wants to be searchable( think of a teacher account) it gets harder to find certain projects.

If teacher a creates application a,b,c and he wants the class to use them as an example it would be easy if the class could search teachers name and find all three.

@Brend-Smits
Copy link
Member Author

The main reason for this is that when you cannot search for a user who wants to be searchable( think of a teacher account) it gets harder to find certain projects.

You can still search on (user) name perhaps? We can include the email addresses if the user opted in to show email publically.
If this is the route that we want to go, we need to start making changes to the user model to support this behavior.

@wotwot563 wotwot563 self-assigned this May 27, 2020
@wotwot563 wotwot563 mentioned this issue May 27, 2020
13 tasks
@Brend-Smits Brend-Smits moved this from To do to In progress in Sprint 4 - Backend Jun 3, 2020
Sprint 4 - Backend automation moved this from In progress to Done Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input wanted Open to discussion, input wanted. priority Only assign this label if it's asked to assign this label
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants