Commit Graph

22 Commits

Author SHA1 Message Date
Mia
dd4108c932 Update memorials 2023-10-08 12:43:27 -05:00
Marty-D
4e52d45423 Website: Add current OU to "official" 2023-03-15 15:56:34 -04:00
Kris Johnson
fadd26b99a Website: Update ladder display names (#2103) 2023-03-14 19:38:58 -04:00
Guangcong Luo
9327a27d36 Fix bug in user admin panel
Probably one day we should investigate why group numbers are strings
but also probably our solution will be to switch to TypeScript.
2021-11-25 20:52:52 -05:00
Guangcong Luo
7945207613 Allow chaos/Zarel to demote admins
QoL change. For security reasons, promoting to admin still requires
direct database access.

Fixes #1888
2021-11-12 15:25:36 -05:00
Guangcong Luo
6f6f2c1da9 Memorialize Aulu account 2021-11-12 15:24:47 -05:00
Annika
57ee41c827 Fix e-mail address validation
According to [the PHP documentation](https://www.php.net/manual/en/language.operators.precedence.php), && and || are left-associative.
2021-09-19 15:27:08 -07:00
Guangcong Luo
66238a9ee0 Refactor ntbb-session with auth checking
Auth checking was done relatively sporadically in the past, but this
change adds $users->isSysop/isAdmin/isLeader for more centralized
auth checking.
2021-07-05 18:25:35 -04:00
Guangcong Luo
9c334ac890 Reject invalid email addresses for 2FA settings
This isn't a real validation, it's just to guard against typoes.
2021-07-05 18:07:34 -04:00
Guangcong Luo
4554858226 Require Admin (not Leader) to reset passwords
At some point, Leaders were given the ability to reset passwords. But
the permissions were always intended to be scoped to the Admin
position which requires a working 2FA setting.
2021-07-05 18:07:34 -04:00
Guangcong Luo
596254779f Fix "Copy URL" button in admin control panel 2021-04-30 07:23:41 -04:00
Guangcong Luo
15e732c8de Fix crash in "Copy URL" button 2021-03-18 17:26:45 -04:00
Mia
95bbe72129 Add a button to copy/paste password reset urls (#1728) 2021-03-15 07:54:45 -07:00
Guangcong Luo
934eb7be2c Update ladders and docs 2021-01-22 12:38:50 -05:00
Guangcong Luo
4df93cd077 Fix /users/0
The website API now reports userid '0' as an unregistered user.

Apparently PHP treats the string '0' as falsy. In the interests of
not overhauling literally all our APIs, I've decided to only change
the code in the website API. The rest doesn't need to be changed
because number-only userids haven't been allowed for a very long
time.

Fixes https://github.com/smogon/pokemon-showdown/pull/7704
2020-11-17 20:53:41 -05:00
Guangcong Luo
4840788ad8 Support changing 2FA (Google login) in user page 2020-09-27 12:21:05 -04:00
Guangcong Luo
6d7201e458 Fix misc crashes 2020-09-06 21:52:50 -04:00
Annika
3c64386447 Merge ntbb-database only (#1587) 2020-08-02 17:42:44 -07:00
Guangcong Luo
38b66ef5ec Fix more things caused by website migration 2020-07-28 20:07:08 -04:00
Annika
7361473511 Support configurable URLs in the website (#1575) 2020-07-27 18:06:39 -07:00
Guangcong Luo
0bda3daa80 Update include paths and merge config.inc.php 2020-07-27 17:03:58 -07:00
Guangcong Luo
2105dc8e57 Add website to client repository
Closes #1567

The main reason I'm not simply merging Annika's PR is because this
way makes it clearer that I'm taking responsibility for all this
code, that it's mostly code I wrote, and also because it makes it
easier to ensure that none of the files have been changed.

(Not that I don't personally trust Annika, but I have something
resembling an obligation to users not to expose them to risks based
on personal trust.)
2020-07-27 19:37:04 -04:00