Have displayname, or username if there is no displayname, appear in s… #25305

Merged
merged 1 commit into from Jul 4, 2016

Projects

None yet

3 participants

@scolebrook
Contributor

…haring error messages rather than just username only. Fixes guids appearing in user facing messages in ldap/ad based setups.

@scolebrook scolebrook Have displayname, or username if there is no displayname, appear in s…
…haring error messages rather than just username only. Fixes guids appearing in user facing messages in ldap/ad based setups.
cbe3b25
@scolebrook
Contributor
scolebrook commented Jun 29, 2016 edited

To test, share a file to a group. Login as a member of the that receiving group and try and share that file to another member of the group. On an LDAP/AD system before this commit you see the internal username (objectGUID attribute) of the user you were trying to share to in the error message. After the commit you see that persons displayname if they have one. If a backend doesn't provide a displayname then the username appears as a fallback, just like it does now.

Tested successfully in 8.2.5.

@PVince81 PVince81 added this to the 8.2.7-next-maintenance milestone Jun 30, 2016
@PVince81
Collaborator
@PVince81
Collaborator
PVince81 commented Jul 1, 2016

Tested, works 👍

Second review please @jvillafanez @butonic

@jvillafanez
Contributor

I have my doubts about creating a variable near the top with the display name of what we need (shareWith for eaxample) to reduce duplication, or to keep it as it is now because it should perform faster in same cases (no need to get the display name specially if there is no error)

Anyway, code looks good 👍

@PVince81
Collaborator
PVince81 commented Jul 4, 2016

I have my doubts about creating a variable near the top with the display name of

I recommended not doing this because the call itself does an additional database call which might be wasted if we don't need the display name after all.

@PVince81
Collaborator
PVince81 commented Jul 4, 2016

CC @dragotin @DeepDiver1975 not really a backport but fixes a bug in 8.2

@PVince81 PVince81 merged commit 8e0d6e5 into stable8.2 Jul 4, 2016

21 of 22 checks passed

smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationInsideGroups,mirallBranch=v2.0.2,slave=SMASH Build #15757 in progress...
Details
Scrutinizer 2 new issues
Details
cla-bot-core Build #5077 succeeded in 14 sec
Details
continuous-integration/php-5.4 Build #5397 succeeded in 7 min 21 sec
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
core-ci-linux-jsunit/database=sqlite,label=SLAVE Build #63270 succeeded in 56 sec
Details
core-ci-linux/database=mysql,label=SLAVE Build #32168 succeeded in 13 min
Details
core-ci-linux/database=oci,label=SLAVE Build #32168 succeeded in 37 min
Details
core-ci-linux/database=pgsql,label=SLAVE Build #32168 succeeded in 12 min
Details
core-ci-linux/database=sqlite,label=SLAVE Build #32168 succeeded in 8 min 34 sec
Details
ocs-api-integration-tests-ci Build #11945 succeeded in 22 sec
Details
server-master-linux-externals-ci/database=sqlite,external=smb-silvershell,label=SLAVE Build #11442 succeeded in 1 min 13 sec
Details
server-master-linux-externals-ci/database=sqlite,external=swift-ceph,label=SLAVE Build #11442 succeeded in 1 min 7 sec
Details
server-master-linux-externals-ci/database=sqlite,external=webdav-ownCloud,label=SLAVE Build #11442 succeeded in 6 min 45 sec
Details
server-master-linux-externals-smb-windows-ext-ci/database=sqlite,external=smb-windows,label=master Build #23217 succeeded in 4 min 28 sec
Details
server-master-linux-php7-ci/database=sqlite,label=SLAVE Build #40496 succeeded in 6 min 7 sec
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=litmus,mirallBranch=v2.0.2,slave=SMASH Build #15757 succeeded in 17 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@0,mirallBranch=v2.0.2,slave=SMASH Build #15757 succeeded in 53 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@1,mirallBranch=v2.0.2,slave=SMASH Build #15757 succeeded in 50 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_shareLink,mirallBranch=v2.0.2,slave=SMASH Build #15757 succeeded in 2 hr 1 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePermissions,mirallBranch=v2.0.2,slave=SMASH Build #15757 succeeded in 47 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationGroups,mirallBranch=v2.0.2,slave=SMASH Build #15757 succeeded in 2 hr 5 min
Details
@PVince81 PVince81 deleted the fix-sharing-messages branch Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment