1212use OC \Files \Node \File ;
1313use OCA \DAV \Connector \Sabre \Directory ;
1414use OCA \DAV \Files \FilesHome ;
15- use OCA \Text \AppInfo \ Application ;
15+ use OCA \Text \Service \ ConfigService ;
1616use OCA \Text \Service \WorkspaceService ;
1717use OCP \Files \GenericFileException ;
18- use OCP \Files \IRootFolder ;
1918use OCP \Files \NotPermittedException ;
2019use OCP \ICacheFactory ;
21- use OCP \IConfig ;
2220use OCP \Lock \LockedException ;
2321use Psr \Log \LoggerInterface ;
2422use Sabre \DAV \INode ;
@@ -35,9 +33,8 @@ class WorkspacePlugin extends ServerPlugin {
3533
3634 public function __construct (
3735 private WorkspaceService $ workspaceService ,
38- private IRootFolder $ rootFolder ,
3936 private ICacheFactory $ cacheFactory ,
40- private IConfig $ config ,
37+ private ConfigService $ configService ,
4138 private LoggerInterface $ logger ,
4239 private ?string $ userId ,
4340 ) {
@@ -71,8 +68,8 @@ public function propFind(PropFind $propFind, INode $node) {
7168 return ;
7269 }
7370
74- $ workspaceAvailable = $ this ->config -> getAppValue (Application:: APP_NAME , ' workspace_available ' , ' 1 ' ) === ' 1 ' ;
75- $ workspaceEnabled = $ this ->config -> getUserValue ($ this ->userId , Application:: APP_NAME , ' workspace_enabled ' , ' 1 ' ) === ' 1 ' ;
71+ $ workspaceAvailable = $ this ->configService -> isRichWorkspaceAvailable () ;
72+ $ workspaceEnabled = $ this ->configService -> isRichWorkspaceEnabledForUser ($ this ->userId ) ;
7673
7774 if (!$ workspaceAvailable || !$ workspaceEnabled ) {
7875 return ;
0 commit comments