Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Notes on disabling email editing

...

Code Block
cd ~/dspace-src/
git commit [file]

# OR, to commit all changed files
git commit -a
 

DSpace Tweaks (for Demo site)

Disabling the editing of all EPerson Email addresses

In May/June 2015, we ran into several scenarios where users were logging in as a demo Admin account and promptly changing the email address associated with that account.  In order to avoid this, it is HIGHLY recommended to disable editing of email addresses on demo.dspace.org.

Here's how it's done:

  • In Mirage2, the following jQuery can be added to the ~/dspace-src/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl:

    Code Block
    <xsl:template name="buildHead">
    <head>
    ...
    
       <!-- CUSTOM FOR DEMO.DSPACE.ORG: Don't allow EPerson Emails to be edited, so no one can change default admin acct emails. -->
       <script type="text/javascript">
           jQuery(function() {
               // Change label for email field in "Edit E-Person"
               jQuery("label[for='aspect_administrative_eperson_EditEPersonForm_field_email_address']").text("Email Address (editing is disabled on demo.dspace.org)");
               // Make email field in "Edit E-Person" READ-ONLY
               jQuery("#aspect_administrative_eperson_EditEPersonForm_field_email_address").prop("readonly", true);
            });
       </script>
    </head>
    </xsl:template>
  • In JSPUI, the following jQuery can be added to the ~/dspace-src/dspace-jspui/src/main/webapp/layout/header-submission.jsp:

    Code Block
    <head>
    ...
       <!-- CUSTOM FOR DEMO.DSPACE.ORG: Don't allow EPerson Emails to be edited, so no one can change default admi$
       <script type="text/javascript">
           jQuery(function() {
               // Change label for email field in "Edit E-Person"
               jQuery("label[for='temail']").text("Email (editing disabled on demo.dspace.org):");
               // Make email field in "Edit E-Person" READ-ONLY
               jQuery("#temail").prop("readonly", true);
           });
       </script>
    </head>

Managing Website Content

Website / Splash page

...