Permalink
Browse files

Better Greeting start

  • Loading branch information...
1 parent 8530375 commit 155cff2734e094086a68f358c124e0fa673600ce @austein austein committed with Mar 26, 2007
Showing with 14 additions and 8 deletions.
  1. +5 −0 lib/AuthMitEdu/Model/User.pm
  2. +7 −5 lib/AuthMitEdu/View.pm
  3. +2 −3 share/web/templates/_elements/sidebar
@@ -27,6 +27,11 @@ sub remote_user {
return $user;
}
+sub remote_real {
+ my $realname = $ENV{SSL_CLIENT_S_DN_CN};
+ return unless $realname;
+ return $realname;
+}
sub is_identity {
my ($self, $url) = @_;
@@ -34,14 +34,16 @@ template setup => page {
my $identity = get 'identity';
my $action = Jifty->web->new_action(class => 'SetupAuth');
p {
- outs("The site ");
+ outs("Would you like to allow");
div {{id is "trust_root"}
a {{href is "$root"} $root};
};
};
p {
- outs("would like you verify your identity ($identity). " .
- "Do you want to allow them?");
+ outs("to verify your identity ($identity)? ");
+ };
+ p {
+ outs("Doing so will not grant access to any part of your Athena account. It will only provide confirmation that you are who you claim to be.");
};
form {
for (qw(return_to identity assoc_handle trust_root)) {
@@ -51,8 +53,6 @@ template setup => page {
default_value => get $_);
}
- render_param($action => 'remember');
-
outs_raw($action->button(
label => "Yes",
arguments => { action => 'yes' },
@@ -61,6 +61,8 @@ template setup => page {
label => "No",
arguments => { action => 'no' },
key_binding => "N"));
+
+ render_param($action => 'remember');
}
};
@@ -1,8 +1,7 @@
<div id="salutation">
% if (Jifty->web->current_user->id and Jifty->web->current_user->user_object) {
-% my $u = Jifty->web->current_user->user_object;
-% my $method = $u->_brief_description;
-<%_('Hiya, %1.',$u->$method())%>
+% my $u = AuthMitEdu::Model::User->remote_real;
+<%_('Hiya, %1.',$u)%>
% } else {
<%_("You're not currently signed in.")%>
% }

0 comments on commit 155cff2

Please sign in to comment.