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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sashabeep opened this issue Feb 18, 2022 · 6 comments

Comments

@sashabeep
Copy link

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

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

@sashabeep
Copy link
Author

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)

@BBloke
Copy link

BBloke commented Feb 22, 2022

Does this help? #2032 (comment)

@sashabeep
Copy link
Author

@BBloke i'm not sure i got this

@BBloke
Copy link

BBloke commented Feb 24, 2022

@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!

@sashabeep
Copy link
Author

sashabeep commented Feb 26, 2022

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

@BBloke
Copy link

BBloke commented Mar 15, 2022

@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.

@Seiger Seiger added this to the 3.2.x milestone Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants