Changeset 194


Ignore:
Timestamp:
Nov 20, 2009, 3:13:48 PM (14 years ago)
Author:
gav
Message:

Remove the auto inserted login credentials and message in production mode.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/WebAlbumTagLib.groovy

    r182 r194  
    22
    33    static namespace = "wa"
    4 
    5     def ifDevEnv = { attrs, body ->
    6         def map = grailsApplication.metadata
    7         String env = map[grailsApplication.ENVIRONMENT]
    8         if (env == grailsApplication.ENV_DEVELOPMENT) {
    9             out << body()
    10         }
    11     }
    124
    135    def pictureAnchor = { attrs, body ->
  • trunk/grails-app/views/login/auth.gsp

    r193 r194  
    5454    <div id='login'>
    5555        <h1>Welcome to gnuMims please log in</h1>
     56
     57        <g:if env="development">
    5658        The demo users are <b>user</b>, <b>manager</b> and  <b>admin</b> all having the password: <b>pass</b>
     59        </g:if>
    5760
    5861        <div class='inner'>
     
    6467                <p>
    6568                    <label for='j_username'>Login ID</label>
    66                     <input type='text' class='text_' name='j_username' id='j_username' value='manager' />
     69
     70                    <g:if env="production">
     71                        <input type='text' class='text_' name='j_username' id='j_username'/>
     72                    </g:if>
     73                    <g:else >
     74                        <input type='text' class='text_' name='j_username' id='j_username' value='manager'  />
     75                    </g:else >
     76
    6777                </p>
    6878                <p>
    6979                    <label for='j_password'>Password</label>
    70                     <input type='password' class='text_' name='j_password' id='j_password' value="pass"/>
     80
     81                    <g:if env="production">
     82                        <input type='password' class='text_' name='j_password' id='j_password' />
     83                    </g:if>
     84                    <g:else >
     85                        <input type='password' class='text_' name='j_password' id='j_password' value="pass" />
     86                    </g:else >
    7187                </p>
    7288
Note: See TracChangeset for help on using the changeset viewer.