v8.5.5: Permission Checker injection with File Set
Permalink
Hello.
I need to check if a user can add files to a File Manager folder. How can I replace this old way:
with dependency injection:
How do I inject the Set there, what should be the key? Without the $fs injection I get "Unable to get permission key for add_files"
I need to check if a user can add files to a File Manager folder. How can I replace this old way:
use \Concrete\Core\File\Set\Set; use \Concrete\Core\Permission\Checker; $fs = Set::getGlobal(); $fsp = new Checker($fs);
with dependency injection:
$fp = $this->app->make(Checker::class, ['???' => $fs]);
How do I inject the Set there, what should be the key? Without the $fs injection I get "Unable to get permission key for add_files"