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 #30387 - Remove view_bookmarks
permission
#8486
Conversation
Issues: #30387 |
map.permission :my_account, { :users => [:edit], | ||
map.permission :my_account, { | ||
:users => [:edit], | ||
:notification_recipients => [:index, :update, :destroy, :update_group_as_read, :destroy_group], | ||
:"api/v2/table_preferences" => [:show, :create, :edit, :delete, :index]}, :public => true | ||
:"api/v2/table_preferences" => [:show, :create, :edit, :delete, :index], | ||
}, :public => true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just reformatted as an easier to read multi-line hash, no changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tbrisker!
As a followup, should we move Bookmarks to different menu?
I've seen people wondering why very unpriviledged user sees Administer menu.
@@ -0,0 +1,9 @@ | |||
class DropViewBookmarksPermission < ActiveRecord::Migration[6.0] | |||
def up | |||
Permission.where(name: 'view_bookmarks').destroy_all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might result in empty Filters (if the view_bookmarks
was the only permission granted by that filter), but I'd say that's very rare and quite harmless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks! actually realized my dev db had a bunch of empty filters left behind.
Users should always be able to see public bookmarks and their own bookmarks, a permission is not needed for this case.
I think it makes sense to move it to the user menu. |
[test katello] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tbrisker ! :)
theforeman/theforeman.org#1844 has the upgrade warning |
Users should always be able to see public bookmarks and their own
bookmarks, a permission is not needed for this case.