Skip to content

Add functionality to support multiple directories - #1143

Open
lchris44 wants to merge 2 commits into
UniSharp:masterfrom
lchris44:master
Open

Add functionality to support multiple directories#1143
lchris44 wants to merge 2 commits into
UniSharp:masterfrom
lchris44:master

Conversation

@lchris44

@lchris44 lchris44 commented May 18, 2022

Copy link
Copy Markdown

Summary of the change:

Added option to support multiple directories.

You will be able to achieve that by publishing the LfmConfigHandler and defining a function with the name userAuthDirs()

Inside that function, you can return an array with the user authorized working directories.

Important note: In order to make this work you need to set the userField as '/' like in the example below.

Example:

class LfmConfigHandler
 {
     public function userField()
     {
         return '/';
     }

     public function userAuthDirs()
     {   
         // this will return for example ['files/department1', 'files/department4']
         return Auth::user()->departmentsDirNames();
     }
 }

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant