Commits

Zhang Huangbin committed 260681e

Don't show ldap createTimeStamp.

Comments (0)

Files changed (3)

libs/ldaplib/attrs.py

 # ---------------------------------------------------------
 ADMIN_SEARCH_ATTRS = [
     'mail', 'accountStatus', 'domainGlobalAdmin', 'cn', 'enabledService',
-    'createTimestamp',
 ]
 ADMIN_ATTRS_ALL = [
     'mail', 'accountStatus', 'cn', 'preferredLanguage', 'domainGlobalAdmin',
-    'createTimestamp',
 ]
 
 # ---------------------------------------------------------
     'domainCurrentListNumber',
     'domainCurrentAliasNumber',
     'accountSetting',
-    'createTimestamp',                  # Internal/System attributes.
 ]
 
 DOMAIN_ATTRS_ALL = [
     'domainCurrentListNumber',
     'domainCurrentAliasNumber',
     'accountSetting',
-    'createTimestamp',                  # Internal/System attributes.
 ]
 
 VALUES_DOMAIN_BACKUPMX = ['yes', 'no']
     'mail', 'cn', 'accountStatus', 'mailQuota',
     'employeeNumber', 'title', 'shadowAddress', 'memberOfGroup',
     'storageBaseDirectory', 'mailMessageStore',
-    'lastLoginDate',                    # Last-login tracking.
-    'createTimestamp',                  # Internal/System attributes.
 ]
 
 USER_ATTRS_ALL = [
     # Per-user whitelist & blacklist.
     'amavisWhitelistSender', 'amavisBlacklistSender',
     'mailWhitelistRecipient', 'mailBlacklistRecipient',
-    'lastLoginDate', 'lastLoginIP',     # Last-login tracking.
-    'createTimestamp',                  # Internal/System attributes.
+    'domainGlobalAdmin',    # Global admin
 ]

templates/default/ldap/admin/list.html

             <th>{{ _('Display Name') }}</th>
             <th>{{ _('Mail Address') }}</th>
             <th>{{ _('Global Admin') }}</th>
-            <th>{{ _('Created') }}</th>
         </tr>
         </thead>
 
             {% set cn = entry.get('cn', [''])[0].decode('utf-8') |e %}
             {% set accountStatus = entry.get('accountStatus', ['disabled'])[0] |lower |e %}
             {% set domainGlobalAdmin = entry.get('domainGlobalAdmin', ['no'])[0] |e %}
-            {% set timestamp = entry.get('createTimestamp', ['--------------'])[0] |e %}
 
             <tr class="{{ accountStatus }}">
                 <td><input type="checkbox" class="checkbox " name="mail" value="{{mail}}" {% if mail == session.get('username') %}disabled{% endif %}/></td>
                 </td>
                 <td>{{ highlight_username_in_mail(mail) }}</td>
                 <td>{{ set_admin_type_img(domainGlobalAdmin) }}</td>
-                <td>{{ timestamp |setDatetimeFormat(hour=False) }}</td>
             </tr>
         {% endfor %}
         </tbody>

templates/default/ldap/user/list.html

 {{ userMsgHandler(msg) }}
 
 {% if users is defined %}
-    {% set time_title = _('Created') %}
-    {% set time_var = 'createTimestamp' %}
-
     {# List all users. #}
     <div class="content-box">
         <div class="box-body">
                                 <th>{{ _('User ID') }}</th>
                                 <th>{{ _('Job Title') }}</th>
                                 <th>{{ _('Quota') }}</th>
-                                <th>{{ time_title }}</th>
+                                <th>{{ _('Created') }}</th>
                             </tr>
                         </thead>
 
 
                                 {% set mailQuota = entries.get('mailQuota', ['0'])[0] |e %}
                                 {% set shadowAddresses = entries.get('shadowAddress', []) %}
-                                {% set timestamp = entries.get(time_var, ['--------------'])[0] |e %}
 
                                 <tr class="{{ accountStatus |lower }}">
                                     <td class="checkbox"><input type="checkbox" name="mail" value="{{mail}}" /></td>
                                     <td class="vcenter">{{ employeeid }}</td>
                                     <td class="vcenter">{{ jobTitle }}</td>
                                     <td class="vcenter">{{ mailQuota |filesizeformat }}</td>
-                                    <td class="vcenter">{{ timestamp |setDatetimeFormat(hour=False) }}</td>
                                 </tr>
                             {% endfor %}
                         {% else %}
                             <tr>
                                 <td class="checkbox"></td>
-                                <td colspan="7">{{ _('No mail user available.') }} <a href="{{ctx.homepath}}/create/user/{{ cur_domain }}">{{ _('Add one') }}</a>?</td>
+                                <td colspan="6">{{ _('No mail user available.') }} <a href="{{ctx.homepath}}/create/user/{{ cur_domain }}">{{ _('Add one') }}</a>?</td>
                             </tr>
                         {% endif %}
                     </tbody>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.