[3.1.9] CRITICAL! Группы документов и пользователей не работают, как нужно
sashabeep opened this issue · comments
Steps to reproduce:
- Даем роли Editor права менеджерского доступа, если их еще нет
- Создаем группу ресурсов и группу пользователей, связываем их
- Создаем один защищенный ресурс
- Создаем пользователя с ролью Editor и помещаем его в группу
- Созданный пользователь не может отредактировать ни один документ, ни находящийся в группе, ни доступный для всех, при этом защищенный ресурс в доступной группе виден, но полупрозрачный. Вместо редактора документа выводится текст ошибки (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)
- Снимаем у пользователя Editor группу - становится возможно редактировать документы вне защищенных разделов, но
пока существует хотя бы одна группа ресурсов/пользователей (даже без адиного документа в ней) и включен use_udperms внизу фрейма предупреждение
На данный момент невозможно разграничить права пользователей администраторского раздела
EN:
- Give the Editor role manager access, if it does not already have it
- Create a resource group and a user group and bind them
- Create a single protected resource
- Create a user with the Editor role and place it in the group
- 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
@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.