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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: Mention autocomplete can shows deactivated members of a space #6398

Open
Skylsmoi opened this issue Mar 5, 2024 · 5 comments
Open
Assignees
Labels
backend issue related to backend developpement /apps bug Issues that had not yet been identified at the time of development delivery.

Comments

@Skylsmoi
Copy link
Collaborator

Skylsmoi commented Mar 5, 2024

FIRST ACTION IS TO UPDATE DESCRIPTIOn AND TITLE OF THE ISSUE

Tracim version

4.8.0

Issue description

When creating a mention, the autocomplete popin sometimes show deactivated users.

It appears endpoint GET /api/users/234/workspaces/all/settings returns deactivated users, it should do so when passed a path parameter and the default behavior should be to do not.

How to reproduce

The issue happens intermittently.

  1. Open a space
  2. Open a content of the space
  3. In the comment area, type @
  4. The autocomplete popin sometimes shows deactivated users

Screenshots

No response

What browsers are you seeing the problem on?

No response

What devices are you seeing the problem on?

No response

Related PR

#6501

@Skylsmoi Skylsmoi added backend issue related to backend developpement /apps to sort need first level analyse and release association bug Issues that had not yet been identified at the time of development delivery. labels Mar 5, 2024
@Skylsmoi Skylsmoi added this to To do in Tracim v4.9.0 Mar 5, 2024
@floreal15
Copy link
Collaborator

the end point GET /api/users/234/workspaces/all/settings is suppose to return the workspace settings of the given user, it should not be used for mention and should not contain other user, apart for the user asked ( and the owner of the different workspace )
the end point returning the user for the mention should be GET /api/users/1/known_members (which did seems to return deactivate user)

@Skylsmoi Skylsmoi removed the to sort need first level analyse and release association label Mar 27, 2024
@floreal15
Copy link
Collaborator

At the current state (tracim 4.8.0) when using a mention, tracim will use either know member list ( for the recent activities and dashboard) or the current workspace member list to find the list of available user for mention,
removing the deactivate user from know members will result in them not being in the list of user we could mention but also their name won't be display on content they have create before because they will be unknown by the front end;
I see few possibilities here:

  • do not show the deactivate user, even what they did before being deactivated will appear as create by unknown.
  • separate know member list in tow list in front end, one to store user that could be mentioned and another to store the full list of user to get the full list of user to be able to show who create a content even if deactivate
  • know member list return also if each user is deactivated or not and the front filter by depending if deactivate user should be show or not

@lebouquetin
Copy link
Contributor

@Millefeuille42 could you comment here what solution you are implementing? In last comment, there are 3 options, the first thing to do is to comment here what you plan to do.

@Millefeuille42
Copy link
Member

Solution implemented in #6501 is to add "is_active" field to the response of known_members endpoint. Then in frontend the autocomplete will filter out the inactive users.

@lebouquetin
Copy link
Contributor

I agree this is the best solution 馃憤

@Millefeuille42 Millefeuille42 moved this from In progress to To/Under review in Tracim v4.10.0 May 30, 2024
@Skylsmoi Skylsmoi moved this from To/Under review to In progress in Tracim v4.10.0 May 30, 2024
@Skylsmoi Skylsmoi moved this from In progress to Need test on branch in Tracim v4.10.0 May 31, 2024
@Skylsmoi Skylsmoi moved this from Need test on branch to Done in Tracim v4.10.0 May 31, 2024
@Skylsmoi Skylsmoi moved this from Done to To close in Tracim v4.10.0 May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend issue related to backend developpement /apps bug Issues that had not yet been identified at the time of development delivery.
Projects
Status: To close
Development

No branches or pull requests

4 participants