Skip to content

Conversation

@blizzz
Copy link
Member

@blizzz blizzz commented Feb 13, 2019

This introduces configuration handlers (and a registration method) for files_external. Previously, replacing of "$user" with the uid was hardcoded.

The LDAP backend was extended to take advantage of this mechanism, implementing a placeholder for "$home".

LDAP config:

screenshot_20190213_125756

External storage config example (one invalid with unreplaced placeholder, and the one valid):

screenshot_20190213_130157

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.

Code looks good 👍

…olders

* BackendService (directly accessable via \OC_Server) offers registerConfigHandler
* SimpleSubstitutionTrait brings reusable logic for simple string replacments
* internal $user replacement mechanism was migrated

Signed-off-by: Arthur Schiwon <[email protected]>
* handler registered upon OCA\\Files_External::loadAdditionalBackends
  event as user_ldap is loaded before files_external
* new configuration field "ldapExtStorageHomeAttribute" (not in GUI yet)

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz blizzz force-pushed the feature/noid/extstorage-mountconfighandler branch from ff71930 to 685c13e Compare February 14, 2019 14:22
@blizzz
Copy link
Member Author

blizzz commented Feb 14, 2019

rebased to resolve merge conflict

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Looks good to me but I'd like @icewind1991 to have a look as well.

@icewind1991
Copy link
Member

Code and documentation seem to disagree between using @ or $ as the placeholder prefix

looks good otherwise

@blizzz
Copy link
Member Author

blizzz commented Feb 15, 2019

Thx @icewind1991, good catch, i'll fix the doc later this evening. then it also should be good to merge .

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 15, 2019
@blizzz blizzz merged commit bfd61d8 into master Feb 15, 2019
@blizzz blizzz deleted the feature/noid/extstorage-mountconfighandler branch February 15, 2019 22:09
@MorrisJobke
Copy link
Member

Regression: #15654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish enhancement feature: external storage feature: ldap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants