Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F545340
PhabricatorAuthDowngradeSessionController.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
PhabricatorAuthDowngradeSessionController.php
View Options
<?php
final
class
PhabricatorAuthDowngradeSessionController
extends
PhabricatorAuthController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$panel_uri
=
'/settings/panel/sessions/'
;
$session
=
$viewer
->
getSession
();
if
(
$session
->
getHighSecurityUntil
()
<
time
())
{
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Normal Security Restored'
))
->
appendParagraph
(
pht
(
'Your session is no longer in high security.'
))
->
addCancelButton
(
$panel_uri
,
pht
(
'Continue'
));
}
if
(
$request
->
isFormPost
())
{
id
(
new
PhabricatorAuthSessionEngine
())
->
exitHighSecurity
(
$viewer
,
$session
);
return
id
(
new
AphrontRedirectResponse
())
->
setURI
(
$this
->
getApplicationURI
(
'session/downgrade/'
));
}
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Leaving High Security'
))
->
appendParagraph
(
pht
(
'Leave high security and return your session to normal '
.
'security levels?'
))
->
appendParagraph
(
pht
(
'If you leave high security, you will need to authenticate '
.
'again the next time you try to take a high security action.'
))
->
appendParagraph
(
pht
(
'On the plus side, that purple notification bubble will '
.
'disappear.'
))
->
addSubmitButton
(
pht
(
'Leave High Security'
))
->
addCancelButton
(
$panel_uri
,
pht
(
'Stay'
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 12:47 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
108220
Default Alt Text
PhabricatorAuthDowngradeSessionController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment