Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F427113
Aphront403Response.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Aphront403Response.php
View Options
<?php
final
class
Aphront403Response
extends
AphrontHTMLResponse
{
private
$forbiddenText
;
public
function
setForbiddenText
(
$text
)
{
$this
->
forbiddenText
=
$text
;
return
$this
;
}
private
function
getForbiddenText
()
{
return
$this
->
forbiddenText
;
}
public
function
getHTTPResponseCode
()
{
return
403
;
}
public
function
buildResponseString
()
{
$forbidden_text
=
$this
->
getForbiddenText
();
if
(!
$forbidden_text
)
{
$forbidden_text
=
pht
(
'You do not have privileges to access the requested page.'
);
}
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$dialog
=
id
(
new
AphrontDialogView
())
->
setUser
(
$user
)
->
setTitle
(
pht
(
'403 Forbidden'
))
->
addCancelButton
(
'/'
,
pht
(
'Yikes!'
))
->
appendParagraph
(
$forbidden_text
);
$view
=
id
(
new
PhabricatorStandardPageView
())
->
setTitle
(
pht
(
'403 Forbidden'
))
->
setRequest
(
$request
)
->
setDeviceReady
(
true
)
->
appendChild
(
$dialog
);
return
$view
->
render
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 3, 4:03 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
58546
Default Alt Text
Aphront403Response.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment