Merge branch 'develop'
commit
be9b8eec03
|
@ -128,6 +128,7 @@ function config($translateProvider) {
|
|||
EDIT: 'Edit',
|
||||
BIND_PROPERTY: 'Bind Property',
|
||||
DELETE: 'Delete',
|
||||
UNLOCK: 'Unlock',
|
||||
SELECT: 'Select',
|
||||
RESET: 'Reset',
|
||||
SAVE: 'Save',
|
||||
|
@ -560,9 +561,11 @@ function config($translateProvider) {
|
|||
SUCCESS_ADD_BODY: 'Add {{template}} Success',
|
||||
SUCCESS_UPDATE_BODY: 'Update {{template}} Success',
|
||||
SUCCESS_DELETE_BODY: 'Delete {{template}} Success',
|
||||
SUCCESS_UNLOCK_BODY: 'Unlock {{template}} Success',
|
||||
ERROR_ADD_BODY: 'Add {{template}} Failure',
|
||||
ERROR_UPDATE_BODY: 'Update {{template}} Failure',
|
||||
ERROR_DELETE_BODY: 'Delete {{template}} Failure',
|
||||
ERROR_UNLOCK_BODY: 'Unlock {{template}} Failure',
|
||||
|
||||
USER_PASSWORD: 'User Password',
|
||||
BIND_METER_SUCCESS: 'Bind Meter Success',
|
||||
|
@ -583,10 +586,12 @@ function config($translateProvider) {
|
|||
UNBIND_STORE_SUCCESS: 'Unbind Store Success',
|
||||
},
|
||||
SWEET: {
|
||||
TITLE: 'Please confirm whether to delete?',
|
||||
TITLE: 'Please confirm to delete?',
|
||||
TEXT: 'Deleting this bar will also delete all related data!',
|
||||
CONFIRM_BUTTON_TEXT: 'Confirm delete',
|
||||
CANCEL_BUTTON_TEXT: 'Cancel',
|
||||
UNLOCK_TITLE: 'Please confirm to unlock',
|
||||
UNLOCK_CONFIRM_BUTTON_TEXT: 'Confirm unlock',
|
||||
},
|
||||
API: {
|
||||
ADMINISTRATOR_SESSION_NOT_FOUND: 'Administrator Session Not Found',
|
||||
|
@ -1576,7 +1581,7 @@ function config($translateProvider) {
|
|||
TEXT: '删除该条也会删除所有与其相关数据!',
|
||||
CONFIRM_BUTTON_TEXT: '确认删除',
|
||||
CANCEL_BUTTON_TEXT: '取消',
|
||||
UNLOCK_TITLE: '请确认是否解锁该用户登录权限',
|
||||
UNLOCK_TITLE: '请确认是否解锁?',
|
||||
UNLOCK_CONFIRM_BUTTON_TEXT: '确认解锁'
|
||||
},
|
||||
API: {
|
||||
|
@ -2098,6 +2103,7 @@ function config($translateProvider) {
|
|||
BIND_PROPERTY: 'Bindungseigenschaften',
|
||||
EDIT: 'ändern',
|
||||
DELETE: 'löschen',
|
||||
UNLOCK: 'Öffnen',
|
||||
SELECT: 'wählen',
|
||||
RESET: 'Zurücksetzen',
|
||||
SAVE: 'speichern',
|
||||
|
@ -2534,9 +2540,11 @@ function config($translateProvider) {
|
|||
SUCCESS_ADD_BODY: 'Fügen Sie {{template}} erfolgreich hinzu',
|
||||
SUCCESS_UPDATE_BODY: 'Update {{template}} erfolgreich',
|
||||
SUCCESS_DELETE_BODY: '{{Template}} erfolgreich löschen',
|
||||
SUCCESS_UNLOCK_BODY: 'Öffnen {{template}} erfolgreich',
|
||||
ERROR_ADD_BODY: 'Das Hinzufügen von {{template}} ist fehlgeschlagen',
|
||||
ERROR_UPDATE_BODY: 'Update {{template}} fehlgeschlagen',
|
||||
ERROR_DELETE_BODY: 'Fehler beim Löschen von {{template}}',
|
||||
ERROR_UNLOCK_BODY: 'Öffnen {{template}} fehlgeschlagen',
|
||||
|
||||
USER_PASSWORD: 'Benutzer-Passwort',
|
||||
BIND_METER_SUCCESS: 'Binden Sie das Messgerät erfolgreich',
|
||||
|
@ -2563,6 +2571,8 @@ function config($translateProvider) {
|
|||
TEXT: 'Durch Löschen dieses Artikels werden auch alle zugehörigen Daten gelöscht!',
|
||||
CONFIRM_BUTTON_TEXT: 'Löschung bestätigen',
|
||||
CANCEL_BUTTON_TEXT: 'stornieren',
|
||||
UNLOCK_TITLE: 'Bitte bestätigen, um zu entsperren',
|
||||
UNLOCK_CONFIRM_BUTTON_TEXT: 'Aktivieren bestätigen',
|
||||
},
|
||||
API: {
|
||||
ADMINISTRATOR_SESSION_NOT_FOUND: 'Administrator Session Not Found',
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<a class="btn btn-primary btn-rounded btn-xs" ng-click="editUser(user)" >{{'SETTING.EDIT' | translate}}</a>
|
||||
<a ng-hide="user.name=='administrator'" class="btn btn-info btn-rounded btn-xs" ng-click="resetPassword(user)" >{{'USER.RESET_PASSWORD' | translate}}</a>
|
||||
<a ng-hide="user.name=='administrator'" ng-click="deleteUser(user)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.DELETE' | translate}}</a>
|
||||
<a ng-hide="user.failed_login_count" ng-click="unlockUser(user)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.UNLOCK' | translate}}</a>
|
||||
<a ng-hide="!user.is_locked" ng-click="unlockUser(user)" class="btn btn-danger btn-rounded btn-xs" >{{'SETTING.UNLOCK' | translate}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -60,7 +60,7 @@ class UserCollection:
|
|||
account_expiration_datetime_local.strftime('%Y-%m-%dT%H:%M:%S'),
|
||||
"password_expiration_datetime":
|
||||
password_expiration_datetime_local.strftime('%Y-%m-%dT%H:%M:%S'),
|
||||
"failed_login_count": True if row[10] < 3 else False}
|
||||
"is_locked": True if row[10] >= config.maximum_failed_login_count else False}
|
||||
result.append(meta_result)
|
||||
|
||||
resp.text = json.dumps(result)
|
||||
|
@ -214,7 +214,8 @@ class UserItem:
|
|||
|
||||
query = (" SELECT u.id, u.name, u.display_name, u.uuid, "
|
||||
" u.email, u.is_admin, p.id, p.name, "
|
||||
" u.account_expiration_datetime_utc, u.password_expiration_datetime_utc "
|
||||
" u.account_expiration_datetime_utc, u.password_expiration_datetime_utc,"
|
||||
" u.failed_login_count "
|
||||
" FROM tbl_users u "
|
||||
" LEFT JOIN tbl_privileges p ON u.privilege_id = p.id "
|
||||
" WHERE u.id =%s ")
|
||||
|
@ -242,8 +243,11 @@ class UserItem:
|
|||
"privilege": {
|
||||
"id": row[6],
|
||||
"name": row[7]} if row[6] is not None else None,
|
||||
"account_expiration_datetime": account_expiration_datetime_local.strftime('%Y-%m-%dT%H:%M:%S'),
|
||||
"password_expiration_datetime": password_expiration_datetime_local.strftime('%Y-%m-%dT%H:%M:%S')}
|
||||
"account_expiration_datetime":
|
||||
account_expiration_datetime_local.strftime('%Y-%m-%dT%H:%M:%S'),
|
||||
"password_expiration_datetime":
|
||||
password_expiration_datetime_local.strftime('%Y-%m-%dT%H:%M:%S'),
|
||||
"is_locked": True if row[10] >= config.maximum_failed_login_count else False}
|
||||
resp.text = json.dumps(result)
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in New Issue