blake
(Blake Erickson)
2월 2, 2022, 12:43오전
9
사실 이 문제는 이제 수정되었어야 합니다!
committed 10:02PM - 18 Jan 22 UTC
* FIX: Tag watching for everyone tag groups
Tags in tag groups that have perm… issions set to everyone were not able
to be saved correctly. A user on their preferences page would mark the
tags that they wanted to save, but the watched_tags in the response
would be empty. This did not apply to admins, just regular users. Even
though the watched tags were being saved in the db, the user serializer
response was filtering them out. When a user refreshed their preferences
pages it would show zero watched tags.
This appears to be a regression introduced by:
0f598ca51e7ada06f91a6a8717909627ee81a67c
The issue that needed to be fixed is that we don't track the "everyone"
group (which has an id of 0) in the group_users table. This is because
everyone has access to it, so why fill a row for every single user, that
would be a lot. The fix was to update the query to include tag groups
that had permissions set to the "everyone" group (group_id 0).
I also added another check to the existing spec for updating
watched tags for tags that aren't in a tag group so that it checks the
response body. I then added a new spec which updates watched tags for
tags in a tag group which has permissions set to everyone.
* Resolve failing tests
Improve SQL query syntax for including the "everyone" group with the id
of 0.
This commit also fixes a few failing tests that were introduced. It
turns out that the Fabrication of the Tag Group Permissions was faulty.
What happens when creating the tag groups without any permissions is
that it sets the permission to "everyone". If we then follow up with
fabricating a tag group permission on the tag group instead of having a
single permission it will have 2 (everyone + the group specified)! We
don't want this. To fix it I removed the fabrication of tag group
permissions and just set the permissions directly when creating the tag
group.
* Use response.parsed_body instead of JSON.parse
모든 사용자에게 권한이 설정된 태그 그룹의 태그가 올바르게 저장되지 않는 문제가 있었습니다. 사용자는 자신의 설정 페이지에서 저장하려는 태그를 표시했지만, 응답의 watched_tags가 비어 있었습니다. 이는 관리자에게는 적용되지 않고 일반 사용자만 해당되었습니다. 감시 중인 태그가 데이터베이스에 저장되었음에도 불구하고, 사용자 직렬화 응답에서 필터링되어 제외되었습니다. 사용자가 설정 페이지를 새로 고침하면 감시 중인 태그가 0개로 표시되었습니다.
@nathank , 시간이 나실 때 확인해 주시겠습니까?
2개의 좋아요