-
Notifications
You must be signed in to change notification settings - Fork 88
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
Do not fetch user status if current user is a guest #1379
Do not fetch user status if current user is a guest #1379
Conversation
The user status endpoint is not available for guests, only for logged in users. As the request will always fail if the current user is a guest there should be no need to perform it. Note, however, that this will prevent user statuses to be shown on the avatars in public share pages, even if the current user is actually logged in. Public share pages are opened in ncognito mode, so "getCurrentUser" returns null. However, if the current user is logged in requests to the API would work without problems, so technically it would be possible to fetch the user statuses. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@georgehrke Not sure if there were plans about making status endpoints available for public access? |
No, not at the moment |
Ref nextcloud-libraries/nextcloud-vue#1379 Signed-off-by: Joas Schilling <coding@schilljs.com>
I know, this is already merged, but: Avoid loading the user status for non users is developed in the avatar component (#1348). For guests it is developed in the status component. This looks inconsistent. Shouldn't this be solved together in the same app component? |
Those are 2 different things. #1348 is to not try to render a status for an avatar of non users. This here is because guests will never be able to load any status info for others (atm), independent from which component the request is coming from. |
The user status endpoint is not available for guests, only for logged in users. As the request will always fail if the current user is a guest there should be no need to perform it.
Note, however, that this will prevent user statuses to be shown on the avatars in public share pages, even if the current user is actually logged in. Public share pages are opened in incognito mode, so
getCurrentUser
returns null. However, if the current user is logged in requests to the API would work without problems, so technically it would be possible to fetch the user statuses.Due to the problem described in last paragraph I am not sure if this should be merged or not. In fact the more I think about it the less I like this pull request :-P Opinions?