Skip to content

Testing md5home#26854

Merged
PVince81 merged 3 commits into
masterfrom
testing-md5home
Dec 22, 2016
Merged

Testing md5home#26854
PVince81 merged 3 commits into
masterfrom
testing-md5home

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Description

Allow clearing default user backends in config.php.
Testing app provides test user backend for alternative homes.

Related Issue

Alternative to #26846 and #26851

Motivation and Context

Need tests for alternative getHome

How Has This Been Tested?

  1. Edit config.php and add:
'user_backends' => 
  array (
    'default' => false,   // this is the new setting that kills the default DB user backend
    0 => 
    array (
      'class' => '\\OCA\\Testing\\AlternativeHomeUserBackend',
      'arguments' => 
      array (
      ),
    ),
  ),

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DeepDiver1975 as discussed
@SergioBertolinSG

If approve, I'll add an automated test suite that uses this in #26846

Vincent Petry added 2 commits December 21, 2016 10:35
When specifying "user_backends" in config.php, a new option "default"
when set to false will prevent the default user backend to be
registered. The default one is the database backend.
This makes it possible to select exclusive user backends from apps.
The backend provide md5 result to getHome()
@mention-bot

Copy link
Copy Markdown

@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @DeepDiver1975, @bantu and @xoen to be potential reviewers.

@PVince81 PVince81 added this to the 10.0 milestone Dec 21, 2016
@SergioBertolinSG

Copy link
Copy Markdown
Contributor

Admin user account stops working with this set up.

This is my data folder after having admin, user1, user2 and user3 logged in at least once:

21232f297a57a5a743894a0e4a801fc3  7e58d63b60197ceb55a1c487989a3720  admin    files_external  owncloud.log
24c9e15e52afc47c225b757e7bee1f9d  92877af70a45fd6a2ed7fe81e1236b78  avatars  index.html

Admin user cannot upload files or access to his files.

@PVince81

Copy link
Copy Markdown
Contributor Author

Admin user is not relevant for integration tests, at least not the filesystem ones. FS tests run as newly created users which would get the correct home.

If causing side effects I can add an exception for users called "admin" and return the normal home for that one.

@butonic

butonic commented Dec 21, 2016

Copy link
Copy Markdown
Contributor

ohhh nice!

@PVince81

Copy link
Copy Markdown
Contributor Author

@butonic hold your horses, this is only for the testing app 😉
But nice indeed.

@PVince81

Copy link
Copy Markdown
Contributor Author

@SergioBertolinSG please retry, I excluded "admin" here 79d1ed0

@PVince81

Copy link
Copy Markdown
Contributor Author

All tests passed now, merge ?

@SergioBertolinSG

Copy link
Copy Markdown
Contributor

Works fine 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

We need to backport this if we want to benefit from automated testing... Agreed ? @DeepDiver1975 @SergioBertolinSG

@lock

lock Bot commented Aug 4, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants