View | Details | Raw Unified | Return to bug 55640
Collapse All | Expand All

(-)a/panels/system/users/cc-password-dialog.c (+7 lines)
Lines 143-148 password_changed_cb (PasswdHandler *handler, Link Here
143
        else {
143
        else {
144
                primary_text = _("Password could not be changed");
144
                primary_text = _("Password could not be changed");
145
                secondary_text = error->message;
145
                secondary_text = error->message;
146
147
                if (error->code == PASSWD_ERROR_CHANGE_FAILED) {
148
                        gtk_editable_set_text (GTK_EDITABLE (self->password_entry), "");
149
                        gtk_widget_grab_focus (GTK_WIDGET (self->password_entry));
150
151
                        gtk_editable_set_text (GTK_EDITABLE (self->verify_entry), "");
152
                }
146
        }
153
        }
147
154
148
        dialog = adw_alert_dialog_new (primary_text, secondary_text);
155
        dialog = adw_alert_dialog_new (primary_text, secondary_text);
(-)a/panels/system/users/cc-user-page.c (-1 / +1 lines)
Lines 469-475 update_editable_state (CcUserPage *self) Link Here
469
    self->avatar_editable = (is_current_user (self->user) || !self->locked);
469
    self->avatar_editable = (is_current_user (self->user) || !self->locked);
470
    g_object_notify (G_OBJECT (self), "avatar-editable");
470
    g_object_notify (G_OBJECT (self), "avatar-editable");
471
471
472
    self->editable = self->avatar_editable && act_user_is_local_account (self->user);
472
    self->editable = self->avatar_editable;
473
    g_object_notify (G_OBJECT (self), "editable");
473
    g_object_notify (G_OBJECT (self), "editable");
474
}
474
}
475
475
(-)a/panels/system/users/run-passwd.c (+4 lines)
Lines 440-445 io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass Link Here
440
                                                "match",
440
                                                "match",
441
                                                "1 numeric or special",
441
                                                "1 numeric or special",
442
                                                "failure",
442
                                                "failure",
443
                                                "change failed",
443
                                                "DIFFERENT",
444
                                                "DIFFERENT",
444
                                                "BAD PASSWORD",
445
                                                "BAD PASSWORD",
445
                                                NULL)) {
446
                                                NULL)) {
Lines 497-502 io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass Link Here
497
                                        else if (strstr (str->str, "DIFFERENT")) {
498
                                        else if (strstr (str->str, "DIFFERENT")) {
498
                                                error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
499
                                                error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_REJECTED,
499
                                                                     _("The new password does not contain enough different characters"));
500
                                                                     _("The new password does not contain enough different characters"));
501
                                        } else if (strstr (str->str, "change failed") != NULL) {
502
                                            error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_CHANGE_FAILED,
503
                                                                 _("Password does not meet your organization's security policies. Try a different password or contact your system administrator."));
500
                                        }
504
                                        }
501
                                        else {
505
                                        else {
502
                                                error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_UNKNOWN,
506
                                                error = g_error_new (PASSWD_ERROR, PASSWD_ERROR_UNKNOWN,
(-)a/panels/system/users/run-passwd.h (+1 lines)
Lines 31-36 typedef void (*PasswdCallback) (PasswdHandler *passwd_handler, GError *error, co Link Here
31
/* Error codes */
31
/* Error codes */
32
typedef enum {
32
typedef enum {
33
        PASSWD_ERROR_REJECTED,          /* New password is not secure enough */
33
        PASSWD_ERROR_REJECTED,          /* New password is not secure enough */
34
        PASSWD_ERROR_CHANGE_FAILED,     /* Password can't be changed */
34
        PASSWD_ERROR_AUTH_FAILED,       /* Wrong old password, or PAM failure */
35
        PASSWD_ERROR_AUTH_FAILED,       /* Wrong old password, or PAM failure */
35
        PASSWD_ERROR_REAUTH_FAILED,     /* Password has changed since first authentication */
36
        PASSWD_ERROR_REAUTH_FAILED,     /* Password has changed since first authentication */
36
        PASSWD_ERROR_BACKEND,           /* Backend error */
37
        PASSWD_ERROR_BACKEND,           /* Backend error */

Return to bug 55640