ispras / lingvodoc-react

Apache License 2.0
7 stars 11 forks source link

Merge lexical entries, merge suggestions error #1104

Closed myrix closed 7 months ago

myrix commented 7 months ago

Users report errors when attempting to merge lexical entries and get merge suggestions in https://lingvodoc.ispras.ru/dictionary/7476/2/perspective/8015/2/edit: image image

Looks like the problem is at the https://github.com/ispras/lingvodoc/blob/heavy_refactor/lingvodoc/views/v2/merge.py#L528, when we are checking perspective permissions via requesting the refactored out route 'perspective_roles'.

We should rewrite permission check function check_user_merge_permissions() to use better more modern ACL mechanisms, e.g. by using acl_check_if() method of the request context (see query.py) or by using direct ACL check via acl_check_direct() from acl.py.

vmonakhov commented 7 months ago

Solved using direct ACL check via check_direct() from acl.py.