beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
46 stars 46 forks source link

Balance tab is shown even if the user doesn't have permissions to access it #343

Open L-e-x-o-n opened 1 week ago

L-e-x-o-n commented 1 week ago

https://server4.beyondallreason.info/battle//balace image Clicking "Balance" redirects to starting menu screen with the message that you don't have permissions to view it, the tab shouldn't be shown at all then.

jauggy commented 1 week ago

@L-e-x-o-n assign this one to me as I'm working in this area. Also how did you find this out? Is this from your own testing?

L-e-x-o-n commented 1 week ago

@L-e-x-o-n assign this one to me as I'm working in this area. Also how did you find this out? Is this from your own testing?

Yes, randomly saw it and tried to see what it does. There is one more thing I found out in a similar way, press matches, it will lead you to teiserver/battles, on this page you will see Matches on the top, it's clickable but leads to /matches which dont exist and show an error.

jauggy commented 1 week ago

@L-e-x-o-n If you login to integration server https://server5.beyondallreason.info/battle

you should be able to access the balance tab now as https://github.com/beyond-all-reason/teiserver/pull/328 is on there. The balance tab will allow you to see how the balancer would have worked using both past data and present data. It uses the rating logs table to get past data. However, with my algorithm split_one_chevs that requires chevron information - we don't store that in history so it will always use current chevron data instead.

Let me know if you can access it. The balance tab was originally only viewable by Overwatch team. Now also Contributors and Testers can view it.

L-e-x-o-n commented 1 week ago

@L-e-x-o-n If you login to integration server https://server5.beyondallreason.info/battle

you should be able to access the balance tab now as #328 is on there. The balance tab will allow you to see how the balancer would have worked using both past data and present data. It uses the rating logs table to get past data. However, with my algorithm split_one_chevs that requires chevron information - we don't store that in history so it will always use current chevron data instead.

Let me know if you can access it. The balance tab was originally only viewable by Overwatch team. Now also Contributors and Testers can view it.

That's great, I can see it and it works for me. Is the tab still shown for those without access?

jauggy commented 1 week ago

@L-e-x-o-n If you login to integration server https://server5.beyondallreason.info/battle you should be able to access the balance tab now as #328 is on there. The balance tab will allow you to see how the balancer would have worked using both past data and present data. It uses the rating logs table to get past data. However, with my algorithm split_one_chevs that requires chevron information - we don't store that in history so it will always use current chevron data instead. Let me know if you can access it. The balance tab was originally only viewable by Overwatch team. Now also Contributors and Testers can view it.

That's great, I can see it and it works for me. Is the tab still shown for those without access?

Checkout the PR #328 locally. Then follow the instructions under "Local Dev Tests" that I wrote in the PR and you should be able to test permissions of a normal user. The tab is not visible for a normal user. You need the Contributor, Tester or Overwatch role.