[Bps-public-commit] RT-BugTracker-Public branch, rt4, updated. 124a09343fdc056a2ad51812a33de70dfb874704
Thomas Sibley
trs at bestpractical.com
Fri Mar 1 20:02:24 EST 2013
The branch, rt4 has been updated
via 124a09343fdc056a2ad51812a33de70dfb874704 (commit)
via 8be8f114c07310004a8eeb297aa71fe7d9e2574c (commit)
via be2a36a06522e9bf82568dfdcca788b4983f443b (commit)
via 2428e2a5fe29a3d4f39718231dc397b4193f3869 (commit)
from a0c6f91afaec7e1d6d9fcdd2e9a549e62e5f11b0 (commit)
Summary of changes:
html/Callbacks/BugTracker-Public/autohandler/Auth | 3 ++-
html/Callbacks/BugTracker-Public/autohandler/Default | 6 +++---
html/Public/index.html | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 2428e2a5fe29a3d4f39718231dc397b4193f3869
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Mar 1 14:47:57 2013 -0800
The session CurrentUser is always an object in RT 4; check if it's loaded
diff --git a/html/Callbacks/BugTracker-Public/autohandler/Auth b/html/Callbacks/BugTracker-Public/autohandler/Auth
index 2fd2f9d..01cf4bf 100644
--- a/html/Callbacks/BugTracker-Public/autohandler/Auth
+++ b/html/Callbacks/BugTracker-Public/autohandler/Auth
@@ -49,7 +49,7 @@
# If there's no user and this is not a login request and we're looking
# at a public UI request, log in automatically as the public user so the
# person can get the rights of the system group "Everyone"
-if ( not $session{'CurrentUser'}
+if ( not ($session{'CurrentUser'} and $session{'CurrentUser'}->id)
and not defined $ARGS{user}
and not defined $ARGS{pass} )
{
commit be2a36a06522e9bf82568dfdcca788b4983f443b
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Mar 1 14:48:31 2013 -0800
Make sure to start with a fresh session before logging in the guest user
diff --git a/html/Callbacks/BugTracker-Public/autohandler/Auth b/html/Callbacks/BugTracker-Public/autohandler/Auth
index 01cf4bf..faea91e 100644
--- a/html/Callbacks/BugTracker-Public/autohandler/Auth
+++ b/html/Callbacks/BugTracker-Public/autohandler/Auth
@@ -59,6 +59,7 @@ if ( not ($session{'CurrentUser'} and $session{'CurrentUser'}->id)
unless ( $cu->id ) {
$RT::Logger->error("Couldn't load public user with name '$RT::WebPublicUser'");
} else {
+ RT::Interface::Web::InstantiateNewSession();
$session{'CurrentUser'} = $cu;
}
}
commit 8be8f114c07310004a8eeb297aa71fe7d9e2574c
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Mar 1 14:49:10 2013 -0800
Allow public users access to the queues autocomplete endpoint
While I'm at it, use the configured NoAuth regexp as noted by a comment.
diff --git a/html/Callbacks/BugTracker-Public/autohandler/Default b/html/Callbacks/BugTracker-Public/autohandler/Default
index d326f82..2f92dad 100644
--- a/html/Callbacks/BugTracker-Public/autohandler/Default
+++ b/html/Callbacks/BugTracker-Public/autohandler/Default
@@ -68,10 +68,10 @@ elsif ( $path =~ '^(/+)Dist/Display.html' and $ARGS{'Queue'} ) {
}
# otherwise, drop the user at the Public default page
-# XXX: don't we want to check against 'NoAuthRegexp' instead???
elsif ( $path !~ '^(/+)Public/'
- and $path !~ '^(/+)NoAuth/'
- and $path !~ '^(/+)Ticket/Attachment/') {
+ and $path !~ RT->Config->Get('WebNoAuthRegex')
+ and $path !~ '^(/+)Ticket/Attachment/'
+ and $path !~ '^/+Helpers/Autocomplete/Queues' ) {
$m->redirect($RT::WebPath . "/Public/");
$m->abort();
}
commit 124a09343fdc056a2ad51812a33de70dfb874704
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Mar 1 17:02:09 2013 -0800
Mark distribution search inputs for autocomplete
diff --git a/html/Public/index.html b/html/Public/index.html
index d5737ad..d689984 100755
--- a/html/Public/index.html
+++ b/html/Public/index.html
@@ -53,7 +53,7 @@
<p>
<form action="<% RT->Config->Get('WebPath') %><% $m->request_path %>" method="get">
<label for="form-dist-name"><&|/l&>Find a distribution by full name:</&></label>
- <input type="text" name="Distribution" id="form-dist-name" />
+ <input type="text" name="Distribution" id="form-dist-name" data-autocomplete="Queues" data-autocomplete-autosubmit=1 />
<input type="submit" class="button" value="<&|/l&>Search</&>" />
</form>
</p>
@@ -61,7 +61,7 @@
<p>
<form action="<% RT->Config->Get('WebPath') %><% $m->request_path %>" method="get">
<label for="form-dist-maint"><&|/l&>Find distributions by maintainer:</&></label>
- <input type="text" name="Maintainer" id="form-dist-maint" />
+ <input type="text" name="Maintainer" id="form-dist-maint" data-autocomplete="Users" data-autocomplete-autosubmit=1 />
<input type="submit" class="button" value="<&|/l&>Search</&>" />
</form>
</p>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list