PhlexPlexico / get5-web

[END OF LIFE] Webpanel for servers using the get5 CS:GO server plugin
GNU General Public License v3.0
21 stars 10 forks source link

[BUG] Public Teams / Servers not working for Super Admins #174

Closed TandelK closed 4 years ago

TandelK commented 4 years ago

Describe the bug Deployed latest Master version and tested creating Public Servers and Public Teams via Panel and can confirm not updating for Super Admins. I have not yet tested for Normal Admins if they can use the Public Team / Server option.

Which Build Master

To Reproduce Steps to reproduce the behavior:

  1. Go to Create a Server
  2. Click on Publicly Usable Server.
  3. Add Server. Check the Server information again by clicking on Edit Button.
  4. There is no tick on Publicly Usable Server. Also check on Database value when trying to Add or Update which does not work.

Expected behavior Should normally work for Public Options.

PhlexPlexico commented 4 years ago

Noticed this happened before in another report sent locally to me. Perfect timing for picking this up. It's simply a check on super Admins that currently doesn't exist:

https://github.com/PhlexPlexico/get5-web/blob/development/get5/team.py#L260

If you add in a super admin check after, or use an or statement it should work as intended.

PhlexPlexico commented 4 years ago

Latest development branch should have it solved. Please confirm!

PhlexPlexico commented 4 years ago

Turned out there was more issues than I realized, especially with matches. Should be resolved finally.

TandelK commented 4 years ago

Updated to latest Development branch and found this issues 1) No longer options to select Publicly usable Server for Super Admins - Image 1 2) Creating Teams and selecting Public Teams does not work and when using Edit Team option and selecting Public Team option getting error . Attached in Image 2 >

UPDATE : Can confirm Admin role also cannot use Publicly Usable Server

Image 1 No longer Public Option

Image 2 Cannot create Public Teams

PhlexPlexico commented 4 years ago

Please provide the log for the second image so I can see what's wrong.

PhlexPlexico commented 4 years ago

As for image one, I can't confirm this as it is working on my end. Do you by chance have yourself set as an admin AND a super_admin? If so, make sure you are only a super admin.

Also please make sure that you have the latest development patch and did not make any modifications prior to. If you did, please either stash those or reset your tracking to HEAD to get the latest changes.

TandelK commented 4 years ago

I tried with both the settings first with Super Admin and than changing my ID to Admin only section, so updated the issue that it does not work for both setting yourself as Admin or Super Admin.

I did check the commits and git fetch command and everything and can surely say it is on Development branch.

Error log for Above Image is here attached https://pastebin.com/g07kdRd8

PhlexPlexico commented 4 years ago

Line 265 of team.py contained util.g.user.super_admin and not g.user.super_admin. Replacement method for some reason left that one in there as odd as that. I wasn't hitting it because I wasn't uploading logos. Should be good now?

TandelK commented 4 years ago

Added Super Admin properly to server.py file with Pull Request #176

PhlexPlexico commented 4 years ago

Since PR resolved the issue, going to close now