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

[RTM] Distinguish between error 401 and 403 #1381

Merged
merged 4 commits into from Mar 2, 2018

Conversation

Projects
None yet
2 participants
@leofeyer
Member

leofeyer commented Feb 19, 2018

This PR implements #1274.

@leofeyer leofeyer added the feature label Feb 19, 2018

@leofeyer leofeyer added this to the 4.6.0 milestone Feb 19, 2018

@leofeyer leofeyer self-assigned this Feb 19, 2018

@leofeyer leofeyer requested a review from aschempp Feb 19, 2018

@leofeyer leofeyer changed the title from Distinguish between error 401 and 403 to [RTM] Distinguish between error 401 and 403 Feb 19, 2018

Show outdated Hide outdated src/Controller/FrontendController.php
Show outdated Hide outdated src/Resources/contao/controllers/FrontendIndex.php
public static function find401ByPid($intPid, array $arrOptions=array())
{
$t = static::$strTable;
$arrColumns = array("$t.pid=? AND $t.type='error_401'");

This comment has been minimized.

@aschempp

aschempp Feb 19, 2018

Contributor

so this only works if the page is a direct child of the root page? Is this already the case for 403?

@aschempp

aschempp Feb 19, 2018

Contributor

so this only works if the page is a direct child of the root page? Is this already the case for 403?

This comment has been minimized.

@leofeyer

leofeyer Feb 19, 2018

Member

Yes.

@leofeyer

leofeyer Feb 19, 2018

Member

Yes.

*/
protected function prepare($objRootPage=null)
{
// Use the given root page object if available (thanks to Andreas Schempp)

This comment has been minimized.

@aschempp

aschempp Feb 19, 2018

Contributor

I think you can remove that 😂

@aschempp

aschempp Feb 19, 2018

Contributor

I think you can remove that 😂

@leofeyer leofeyer merged commit 1894910 into contao:master Mar 2, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.7%) to 97.876%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment