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

Fixes #25648 - Delete filters as system admin #6330

Merged
merged 1 commit into from Dec 21, 2018

Conversation

xprazak2
Copy link
Contributor

No description provided.

@theforeman-bot
Copy link
Member

Issues: #25648

san7ket
san7ket previously approved these changes Dec 13, 2018
Copy link

@san7ket san7ket left a comment

Choose a reason for hiding this comment

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

As a system admin, I was able to delete the filter on role successfully

@@ -69,7 +69,7 @@ def find_role

def resource_base
@resource_base ||= if @role.present?
@role.filters.authorized(current_permission)
Filter.authorized_as(User.current, current_permission)
Copy link
Member

Choose a reason for hiding this comment

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

as suggested on IRC, Filter.authorized(current_permission) would be nicer if it works

@xprazak2
Copy link
Contributor Author

Changed, Filter.authorized(current_permission) worked for me.

@ares
Copy link
Member

ares commented Dec 21, 2018

Thanks @xprazak2, merging!

@ares ares merged commit 65f476e into theforeman:develop Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants