As far as fossasia/open-event-server#4922 is concerned, I think it's done on purpose. Discount code is a sensitive information and hence it is not shown to every user. It is only shown to the event organizer or the admin.
If we show any registered user the discount code, then it would defeat the purpose of it being a code. It's a coupon, if you start giving everyone the coupon then what's the point of it.
For e.g. let's say a ticket is priced at 10 dollars and the event organizer created a discount code that provides a discount of 10 percent. Anyone who has the discount code could now use it and will only have to pay 9 dollars instead of 10.
Now if we made it public so everyone would have the discount code and hence everyone will only pay 9 dollars for it. So why don't we just decrease the price of the ticket to 9 dollars. Hope you understood why we are not providing discount code relationships or the list of discount code list to everyone.