Page MenuHomePhorge

Shared folder aliases
ClosedPublic

Authored by machniak on Feb 1 2022, 8:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 7:27 PM
Unknown Object (File)
Thu, Apr 4, 7:29 PM
Unknown Object (File)
Mar 17 2024, 6:21 AM
Unknown Object (File)
Mar 2 2024, 10:35 PM
Unknown Object (File)
Feb 23 2024, 7:38 PM
Unknown Object (File)
Feb 1 2024, 10:14 PM
Unknown Object (File)
Jan 24 2024, 2:12 PM
Unknown Object (File)
Jan 24 2024, 9:43 AM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rKc76b08d854d8: Shared folder aliases
Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.
  • Various fixes, improvements
  • Fixes
  • Merge branch 'master' into dev/shared-folder-aliases
  • More tests
  • Merge branch 'master' into dev/shared-folder-aliases
mollekopf added inline comments.
src/app/Console/Commands/SharedFolder/AddAliasCommand.php
42

Could another folder already occupy the same alias?

51

Is there a usecase for this? Why would the validation fail and we still want to force create it?

src/app/Http/Controllers/API/V4/Admin/UsersController.php
68

This allows to search for a user using an alias to a shared folder the user owns?
This seems odd to me, but the same goes for resources and shared folders I suppose.
Nothing to fix I guess, just a comment to perhaps reconsider if this is really useful.

src/app/Resource.php
34

Why must this be the first after UuidIntKeyTrait?

src/app/Console/Commands/SharedFolder/AddAliasCommand.php
42

This check here is to prevent the same alias added twice to the folder. Answering the question... we apply the same rules as to users, see validateAlias() below. So, the same alias can be assigned to many folders in a custom domain.

51

I'm not sure. It was copy-pasted from the existing user:add-alias command.

src/app/Http/Controllers/API/V4/Admin/UsersController.php
68

I guess sometimes you might just have an email address of someone/something. So, it makes sense, but probably a rare case.

src/app/Resource.php
34

Both traits register "creating" event handler, and EmailPropertyTrait's handler needs the $id property to be set (which is set by the other trait). See bootEmailPropertyTrait().

This revision is now accepted and ready to land.Feb 22 2022, 10:13 AM
This revision was automatically updated to reflect the committed changes.