Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow admin to disable lookupserver upload #4250

Merged
merged 3 commits into from
Apr 10, 2017

Conversation

schiessle
Copy link
Member

Allow the admin to disable the possibility to publish user specific data on the lookup server.

fixes the "turn off showing phone number, address, WWW, Twitter" part of #3821

cc @KB7777

@schiessle schiessle added this to the Nextcloud 12.0 milestone Apr 7, 2017
@schiessle schiessle changed the title Disable lookupserver upload allow admin to disable lookupserver upload Apr 7, 2017
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
…rofile picture'

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
@schiessle schiessle force-pushed the disable-lookupserver-upload branch from 92d77b7 to d5173ac Compare April 7, 2017 14:30
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Apr 7, 2017
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nitpicks, the rest looks good though

*/
public function isLookupServerUploadEnabled() {
$result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes');
return ($result === 'yes') ? true : false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ($result === 'yes') part already results in a proper boolean value, no need for the ternary operator here 😉

We could even shorten this to

return $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes';

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completely right, that's happen if you copy&paste methods and only replace the relevant parts 😉

I will not do the last step you suggested because I think this makes it harder to debug but will simplify the return statement

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
@schiessle schiessle merged commit 235563f into master Apr 10, 2017
@ChristophWurst ChristophWurst deleted the disable-lookupserver-upload branch April 10, 2017 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants