Project

General

Profile

Revision 10010

Added by Chris Jones over 4 years ago

Change the ldapweb.cgi script to use an additional property called email.contact which provides a contat email (particularly when email.sender is set to noreply@...). Update the skin configurations with this property, as well as the metacat.properties default.

View differences:

lib/metacat.properties
400 400

  
401 401
email.mailhost=localhost
402 402
email.sender=knb-software@nceas.ucsb.edu
403
email.contact=knb-software@nceas.ucsb.edu
403 404
email.admin=KNB Support
404 405
email.recipient=knb-software@nceas.ucsb.edu
405 406

  
lib/style/skins/account/account.properties
21 21
registry.templates.footer=genericFooter.tmpl
22 22

  
23 23
# email settings
24
email.sender=NCEAS Identity Service <help@nceas.ucsb.edu>
25
email.recipient=help@nceas.ucsb.edu
24
email.sender=NCEAS Account Service <noreply@nceas.ucsb.edu>
25
email.contact=Contact: help@nceas.ucsb.edu
26
email.recipient=noreply@nceas.ucsb.edu
26 27
email.admin=the identify service administrator
lib/style/skins/default/default.properties
26 26
registry.templates.getReviews=
27 27

  
28 28
# email settings
29
email.sender=NCEAS Data Repository <help@nceas.ucsb.edu>
30
email.recipient=help@nceas.ucsb.edu
29
email.sender=NCEAS Data Repository <noreply@nceas.ucsb.edu>
30
email.recipient=noreply@nceas.ucsb.edu
31
email.contact=Contact: help@nceas.ucsb.edu
31 32
email.admin=the repository administrator
32 33

  
33 34
# registry display settings
lib/style/skins/knb/knb.properties
28 28
registry.templates.getReviews=
29 29

  
30 30
# email settings
31
email.sender=NCEAS Data Repository <help@nceas.ucsb.edu>
32
email.recipient=help@nceas.ucsb.edu
31
email.sender=NCEAS Data Repository <noreply@nceas.ucsb.edu>
32
email.recipient=noreply@nceas.ucsb.edu
33
email.contact=Contact: help@nceas.ucsb.edu
33 34
email.admin=the repository administrator
34 35

  
35 36
# registry display settings
lib/style/skins/metacatui/metacatui.properties
27 27
registry.templates.getReviews=
28 28

  
29 29
# email settings
30
email.sender=Data Repository <help@nceas.ucsb.edu>
31
email.recipient=help@nceas.ucsb.edu
30
email.sender=Data Repository <noreply@nceas.ucsb.edu>
31
email.recipient=noreply@nceas.ucsb.edu
32
email.contact=Contact: help@nceas.ucsb.edu
32 33
email.admin=the repository administrator
33 34
email.overrideURL=/#external/
34 35

  
lib/style/skins/nceas/nceas.properties
27 27
registry.templates.getReviews=
28 28

  
29 29
# email settings
30
email.sender=NCEAS Data Repository <help@nceas.ucsb.edu>
31
email.recipient=help@nceas.ucsb.edu
30
email.sender=NCEAS Data Repository <noreply@nceas.ucsb.edu>
31
email.recipient=noreply@nceas.ucsb.edu
32
email.contact=Contact: help@nceas.ucsb.edu
32 33
email.admin=the repository administrator
33 34

  
34 35
# registry display settings
lib/style/skins/obfs/obfs.properties
28 28
registry.templates.getReviews=
29 29

  
30 30
# email settings
31
email.sender=NCEAS Data Repository <help@nceas.ucsb.edu>
32
email.recipient=help@nceas.ucsb.edu
31
email.sender=NCEAS Data Repository <noreply@nceas.ucsb.edu>
32
email.recipient=noreply@nceas.ucsb.edu
33
email.contact=Contact: help@nceas.ucsb.edu
33 34
email.admin=the repository administrator
34 35

  
35 36
# registry display settings
src/perl/ldapweb.cgi
1
#!/usr/bin/perl -w
1
#!/usr/bin/perl -w
2 2
#
3 3
#  '$RCSfile$'
4 4
#  Copyright: 2001 Regents of the University of California 
......
290 290

  
291 291
if(!@validDisplayOrgList) {
292 292
     my $sender;
293
     my $contact;
293 294
     $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
295
     $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
294 296
    print "Content-type: text/html\n\n";
295 297
    print "The value of property ldap.templates.organizationList in " 
296 298
     . $skinName . ".properties file or metacat.properties file (if the property doesn't exist in the " 
297
     . $skinName . ".properties file) is invalid. Please send the information to ". $sender;
299
     . $skinName . ".properties file) is invalid. Please send the information to ". $contact;
298 300
    exit(0);
299 301
}
300 302

  
......
453 455

  
454 456
    my $mailhost = $properties->getProperty('email.mailhost');
455 457
    my $sender;
458
    my $contact;
456 459
    $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
460
    $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
457 461
    debug("the sender is " . $sender);
462
    debug("the contact is " . $contact);
458 463
    my $recipient = $query->param('mail');
459 464
    # Send the email message to them
460 465
    my $smtp = Net::SMTP->new($mailhost) or do {  
......
993 998

  
994 999
        Thanks,
995 1000
            $sender
1001
            $contact
996 1002
    
997 1003
        ENDOFMESSAGE
998 1004
        $message =~ s/^[ \t\r\f]+//gm;
......
1230 1236
    if(!$nextUidNumber) {
1231 1237
        print "Content-type: text/html\n\n";
1232 1238
         my $sender;
1239
         my $contact;
1233 1240
        $sender = $skinProperties->getProperty("email.recipient") or $sender = $properties->getProperty('email.recipient');
1234
        my $errorMessage = "The Identity Service can't get the next avaliable uid number. Please try again.  If the issue persists, please contact the administrator - $sender.
1241
        $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
1242
        my $errorMessage = "The Identity Service can't get the next avaliable uid number. Please try again.  If the issue persists, please contact the administrator - $contact.
1235 1243
                           The possible reasons are: the dn - $dn_store_next_uid or its attribute - $attribute_name_store_next_uid don't exist; the value of the attribute - $attribute_name_store_next_uid
1236 1244
                           is not a number; or lots of users were registering and you couldn't get a lock on the dn - $dn_store_next_uid.";
1237 1245
        fullTemplate(['register'], { stage => "register",
......
1302 1310
    
1303 1311
    my $mailhost = $properties->getProperty('email.mailhost');
1304 1312
    my $sender;
1313
    my $contact;
1305 1314
    $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
1315
    $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
1306 1316
    debug("the sender is " . $sender);
1317
    debug("the contact is :" . $contact);
1307 1318
    my $recipient = $query->param('mail');
1308 1319
    # Send the email message to them
1309 1320
    my $smtp = Net::SMTP->new($mailhost) or do {  
......
1327 1338

  
1328 1339
    Thanks,
1329 1340
        $sender
1341
        $contact
1330 1342
    
1331 1343
     ENDOFMESSAGE
1332 1344
     $message =~ s/^[ \t\r\f]+//gm;

Also available in: Unified diff