forked from kompetenzinventar/ki-backend
implement visible authorisation
This commit is contained in:
@ -116,6 +116,9 @@ def get_user_profile(user_id):
|
||||
if profile is None:
|
||||
return make_response({}, 404)
|
||||
|
||||
if not profile.visible and profile.user.id != g.user.id:
|
||||
return make_response({}, 403)
|
||||
|
||||
return make_response({
|
||||
"profile": profile.to_dict(),
|
||||
})
|
||||
|
Reference in New Issue
Block a user