This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app
Blake Erickson cb8746c7e7
FIX: Update sidebar links when promoted to admin (#18928)
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: 1b56a55f50

And: e320bbe513
2022-11-07 16:39:24 -07:00
..
assets DEV: Load client site settings YML into JS tests (#18413) 2022-11-08 09:17:43 +10:00
controllers FIX: Welcome topic should be hidden on the /categories page as well (#18869) 2022-11-07 09:24:55 -07:00
helpers Meta topic: https://meta.discourse.org/t/meta-theme-color-is-not-respecting-current-color-scheme/239815 (#18832) 2022-11-07 10:06:26 +03:00
jobs DEV: Quote values when constructing SQL (#18827) 2022-11-01 14:05:13 -05:00
mailers FEATURE: Custom unsubscribe options (#17090) 2022-06-21 15:49:47 -03:00
models FIX: Update sidebar links when promoted to admin (#18928) 2022-11-07 16:39:24 -07:00
serializers FIX: Make can_send_private_messages not reliant on system user (#18812) 2022-11-07 09:11:18 +10:00
services SECURITY: Expand and improve SSRF Protections (#18815) 2022-11-01 16:33:17 +00:00
views UX: update and consolodate published page styles (#18792) 2022-11-01 14:31:39 -04:00