evolution-cms / evolution

Welcome to the new evolution of MODX Evolution!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[3.1.9] CRITICAL! Группы документов и пользователей не работают, как нужно

sashabeep opened this issue · comments

Steps to reproduce:

  1. Даем роли Editor права менеджерского доступа, если их еще нет
  2. Создаем группу ресурсов и группу пользователей, связываем их
  3. Создаем один защищенный ресурс
  4. Создаем пользователя с ролью Editor и помещаем его в группу
  5. Созданный пользователь не может отредактировать ни один документ, ни находящийся в группе, ни доступный для всех, при этом защищенный ресурс в доступной группе виден, но полупрозрачный. Вместо редактора документа выводится текст ошибки (tracy/evo)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'for6_document_groups.document_group' in 'where clause' (SQL: select `template`, `menuindex` from `for6_site_content` where `for6_site_content`.`parent` = 2 and `for6_site_content`.`published` = 1 and `for6_site_content`.`deleted` = 0 and (`isfolder` = 0 and `id` = 1) and (`privatemgr` = 0 or `for6_document_groups`.`document_group` in (1)) and `for6_site_content`.`deletedon` = 0 order by `menuindex` asc limit 1)

Снимок экрана 2022-02-18 в 11 06 34

Снимок экрана 2022-02-18 в 12 41 56

  1. Снимаем у пользователя Editor группу - становится возможно редактировать документы вне защищенных разделов, но
    пока существует хотя бы одна группа ресурсов/пользователей (даже без адиного документа в ней) и включен use_udperms внизу фрейма предупреждение

Снимок экрана 2022-02-18 в 11 03 12

На данный момент невозможно разграничить права пользователей администраторского раздела

EN:

  1. Give the Editor role manager access, if it does not already have it
  2. Create a resource group and a user group and bind them
  3. Create a single protected resource
  4. Create a user with the Editor role and place it in the group
  5. The created user is unable to edit any document neither in the group nor available to all, while the protected resource in the available group is visible but semi-transparent. The error text is displayed instead of the document editor (tracy/evo)

Does this help? #2032 (comment)

@BBloke i'm not sure i got this

@sashabeep I checked out my install v3.1.9 as my fix from the above post had been reverted on upgrading the site.

I put the fix back and I believe it works as I would expect.

I do think it's what you are looking for. Sadly I'm not very well versed with github so all we can hope for is it's inclusion in the next update!

@BBloke i tried to apply those patches but it doesn't change anything
Снимок экрана 2022-02-26 в 13 35 04

@sashabeep That's a different error. The SQL statement has more than one 'id' field and the statement isn't explicitly referencing 'id'.

(`isfolder` = 0 and `id` = 1)

It's the id field which is causing the above. It should refer specifically to the table it is coming from, such as for6_site_content.id for instance.