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

Refs #33551 - fix the searching in audits by user #8864

Merged
merged 1 commit into from Oct 27, 2021

Conversation

ares
Copy link
Member

@ares ares commented Oct 21, 2021

The first PR allowed to search in search_users relation, however that
searches on the actual audited objects. So when used in filters, it
would grant access to see all audits of $my account by anyone. While
such search may still be useful, the original intention was to allow
searching by the author of the audit.

Given the user is already a search keyword, we call this
authored_by_user. The correct syntax then is

authored_by_user = admin
authored_by_user = current_user

authored_by_user.id = 2
authored_by_user.id = current_user

The first PR allowed to search in search_users relation, however that
searches on the actual audited objects. So when used in filters, it
would grant access to see all audits of $my account by anyone. While
such search may still be useful, the original intention was to allow
searching by the author of the audit.

Given the user is already a search keyword, we call this
authored_by_user. The correct syntax then is

authored_by_user = admin
authored_by_user = current_user

authored_by_user.id = 2
authored_by_user.id = current_user
@theforeman-bot
Copy link
Member

Issues: #33551

@ares
Copy link
Member Author

ares commented Oct 21, 2021

@ezr-ondrej this should probably go in 3.0, the original PR does not cause any harm but some confusion

@ezr-ondrej ezr-ondrej self-assigned this Oct 27, 2021
Copy link
Member

@ezr-ondrej ezr-ondrej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ares !

@ezr-ondrej ezr-ondrej merged commit dc1ac38 into theforeman:develop Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants