mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 21:19:41 -06:00
cb8746c7e7
It is likely that a new admin user was created as just a regular user before being promoted to admin so this change will update the sidebar link records for any users that are promoted to admin. This way if any of the default side bar categories or tags are restricted to admins these new admins will have those added to their sidebar as well. You can easily replicate this issue locally (prior to this fix) by using `rails admin:create` where it creates a user first, then it is promoted to admin. This means it would receive the default categories of regular user, but never receive the ones they should have access to as an admin. As part of this change I did drop the `!` from `SidebarSectionLink.insert_all` so that it would add any new records that were missing, but not throw a unique constraint error trying to add any existing records. Follow up to: |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |