Skip to content

"view as user" test, rework uses of die() #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Apr 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fa5d021
replace die with exception
simonLeary42 Apr 25, 2025
4bf3d45
use if/then instead of die
simonLeary42 Apr 25, 2025
6951cf5
set unique session cache location for each phpunit run
simonLeary42 Apr 25, 2025
e466ba2
viewAsUser test
simonLeary42 Apr 25, 2025
01e7581
UnitySite not static
simonLeary42 Apr 25, 2025
a6ea0ad
remove pointless file
simonLeary42 Apr 25, 2025
8eb8a0e
ajax php don't initialize entire stack
simonLeary42 Apr 28, 2025
f14bbef
every switchUser has a fresh session by default
simonLeary42 Apr 28, 2025
c2ceb00
get post always discard output
simonLeary42 Apr 28, 2025
ace27c4
Revert "UnitySite not static"
simonLeary42 Apr 29, 2025
65a7e5d
add UnitySite::die
simonLeary42 Apr 29, 2025
8ff1cc7
Revert "replace die with exception"
simonLeary42 Apr 29, 2025
42091f8
add functions errorLog, badRequest
simonLeary42 Apr 29, 2025
7b4b4a1
update ViewAsUserTest
simonLeary42 Apr 29, 2025
e32f557
get test working
simonLeary42 Apr 29, 2025
160b563
add exceptions
simonLeary42 Apr 29, 2025
e2b5a0d
delete comments
simonLeary42 Apr 29, 2025
62e6972
unused import
simonLeary42 Apr 29, 2025
22b8b41
rename post to http_post, get to http_get
simonLeary42 Apr 29, 2025
e4fd195
fix die
simonLeary42 Apr 29, 2025
532080f
add pre commit check for usage of die
simonLeary42 Apr 29, 2025
fe9ea0f
no color in die checker
simonLeary42 Apr 29, 2025
2ed84d9
dont print to stderr
simonLeary42 Apr 29, 2025
5c5f0ef
ignore phpunit result cache
simonLeary42 Apr 29, 2025
18c3c8e
don't allow exit() either
simonLeary42 Apr 29, 2025
c0a3163
refactor
simonLeary42 Apr 29, 2025
f535351
show both die and exit
simonLeary42 Apr 29, 2025
95bb809
get -> http_get
simonLeary42 Apr 29, 2025
d2f4c87
revert conditional
simonLeary42 Apr 29, 2025
d1f07cb
revert conditional 2
simonLeary42 Apr 29, 2025
e3938b7
add message
simonLeary42 Apr 29, 2025
fb8d2f4
remove unused exception class
simonLeary42 Apr 29, 2025
dc29a00
exclude UnitySite from die check
simonLeary42 Apr 29, 2025
ce9409d
use unauthorized function, don't print anything to use
simonLeary42 Apr 29, 2025
aef306a
allow empty die(), rename unauthorized to forbidden
simonLeary42 Apr 29, 2025
e4db086
don't explode trace
simonLeary42 Apr 29, 2025
88fdc46
remove broken magic response code reason
simonLeary42 Apr 29, 2025
06fcb51
httpResponseCode private
simonLeary42 Apr 29, 2025
9d39d30
more tests
simonLeary42 Apr 30, 2025
7b6a731
allow undefined server protocol
simonLeary42 Apr 30, 2025
71a8246
more tests
simonLeary42 Apr 30, 2025
f01f7a7
clear view before redirect nonexistent user
simonLeary42 Apr 30, 2025
80c2e08
remove comment
simonLeary42 Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add message
  • Loading branch information
simonLeary42 committed Apr 29, 2025
commit e3938b701277c475885c2389d8d1cf3dd9d6053a
2 changes: 1 addition & 1 deletion webroot/panel/ajax/get_group_members.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

if ($found) {
UnitySite::die();
UnitySite::die("not a group member");
}

$count = count($members);
Expand Down