Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Scabrero/users fix empty displayname #1111

Merged
merged 5 commits into from

3 participants

@kernevil
Collaborator

No description provided.

main/core/src/EBox/CGI/ClientRawBase.pm
@@ -196,12 +196,14 @@ sub run
"a bug, relevant information can ".
"be found in the logs.");
$self->_print_error($error);
+ EBox::trace();
@jacalvo Owner
jacalvo added a note

is this intended? or just a forgotten debug?

forgotten debug.

I have a better approach to fix this issue + some extra fixes to the displayname field handling. I'm just extending anste tests now to validate the changes (I already validated them manually)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Carlos Perel... added some commits
Carlos Perelló Marín Merge branch 'master' into scabrero/users-fix-empty-displayname d9d6e99
Carlos Perelló Marín Removed debug 9ad103f
Carlos Perelló Marín Fixed the attribute name for displayName when setting or deleting it …
…and fixed the Tree User widget when displayName is undef
98c3308
@carlosperello

I updated the users/standalone-with-samba suite to test the displayname field edition and user selection that was failing...

Standalone basic users operations Test Suite with samba enabled
    InstallNonProfilePackages: OK
    EnableUsersZentyalTest: OK
    LetSambaProvision: OK
    AddUserWithNonASCIIChars: OK
    EditUserWithNonASCIIChars: OK
    AddGroup: OK
    AddUserToGroup: OK
    AddUser: OK
    CheckUser: OK
    EditUser: OK
    EditUserDisplayName: OK
    CheckUserDisplayName: OK
    EditUserDisplayNameSetEmpty: OK
    CheckUserDisplayName: OK
    AddGroup: OK
    AddUserToGroup: OK
    CheckGroup: OK
    DelUser: OK
    CheckDeletedUser: OK
    AddOU: OK
    AddUserToOU: OK
    CheckUSer: OK
    CheckSSHLoginWithoutPAM: OK
    EnablePAM: OK
    CheckSSHLoginWithPAM: OK
    AddDistributionGroup: OK
    EditDistributionGroup: OK
    ChangeDistributionGroupType: OK
    AddSecurityGroup: OK
    EditSecurityGroup: OK
    ChangeSecurityGroupType: OK
    CheckSambaPostGroupAddRemoval: OK
    CheckSambaPostGroupAddMembershipRemovalAndAdding: OK
    check-zentyal-log: OK
    check-syslog-apparmor: OK
@jacalvo jacalvo merged commit 358eae9 into from
@jacalvo jacalvo deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2014
  1. @kernevil

    Add debug trace

    kernevil authored
  2. @kernevil
Commits on Mar 12, 2014
  1. Merge branch 'master' into scabrero/users-fix-empty-displayname

    Carlos Perelló Marín authored
  2. Removed debug

    Carlos Perelló Marín authored
  3. Fixed the attribute name for displayName when setting or deleting it …

    Carlos Perelló Marín authored
    …and fixed the Tree User widget when displayName is undef
This page is out of date. Refresh to see the latest.
View
4 main/users/src/EBox/Users.pm
@@ -420,13 +420,13 @@ sub _migrateTo34
my $users = $self->users(1);
foreach my $user (@{$users}) {
unless ($user->displayname()) {
- $user->set('displayname', $user->fullname());
+ $user->set('displayName', $user->fullname());
}
}
foreach my $contact (@{$self->contacts()}) {
unless ($contact->displayname()) {
- $contact->set('displayname', $contact->fullname());
+ $contact->set('displayName', $contact->fullname());
}
}
}
View
4 main/users/src/EBox/Users/CGI/EditContact.pm
@@ -80,9 +80,9 @@ sub _process
}
my $displayname = $self->unsafeParam('displayname');
if (length ($displayname)) {
- $contact->set('displayname', $displayname, 1);
+ $contact->set('displayName', $displayname, 1);
} else {
- $contact->delete('displayname', 1);
+ $contact->delete('displayName', 1);
}
my $description = $self->unsafeParam('description');
if (length ($description)) {
View
4 main/users/src/EBox/Users/CGI/EditUser.pm
@@ -84,10 +84,10 @@ sub _process
my $displayname = $self->unsafeParam('displayname');
if (length ($displayname)) {
- $user->set('displayname', $displayname, 1);
+ $user->set('displayName', $displayname, 1);
$setText = $user->name() . " ($displayname)";
} else {
- $user->delete('displayname', 1);
+ $user->delete('displayName', 1);
$setText = $user->name();
}
my $description = $self->unsafeParam('description');
View
2  main/users/src/templates/edituser.mas
@@ -45,7 +45,7 @@ my $iconClass = $user->isDisabled() ? 'icon-duser' : 'icon-user';
<& masterSlaveUserAttr,
name => 'displayname',
- value=> $user->displayname(),
+ value=> ($user->displayname() or ''),
slave => $slave,
&>
</div>
Something went wrong with that request. Please try again.