@@ -30,21 +30,21 @@ public function __construct($AppName, IRequest $request, IConfig $config, IUserM
3030 $ this ->config = new \OCA \Solid \ServerConfig ($ config , $ urlGenerator , $ userManager );
3131 }
3232
33- private function getUserApps ($ userId ) {
33+ private function getUserApps ($ userId ) {
3434 $ userApps = [];
3535 if ($ this ->userManager ->userExists ($ userId )) {
36- $ allowedClients = $ this ->config ->getAllowedClients ($ userId );
36+ $ allowedClients = $ this ->config ->getAllowedClients ($ userId );
3737 foreach ($ allowedClients as $ clientId ) {
3838 $ registration = $ this ->config ->getClientRegistration ($ clientId );
3939 $ userApps [] = $ registration ['client_name ' ];
4040 }
4141 }
4242 return $ userApps ;
43- }
43+ }
4444
4545 private function getAppsList () {
46- $ path = __DIR__ . "/../solid-app-list.json " ;
47- $ appsListJson = file_get_contents ($ path );
46+ $ path = __DIR__ . "/../solid-app-list.json " ;
47+ $ appsListJson = file_get_contents ($ path );
4848 $ appsList = json_decode ($ appsListJson , true );
4949
5050 $ userApps = $ this ->getUserApps ($ this ->userId );
@@ -58,7 +58,7 @@ private function getAppsList() {
5858 $ appsList [$ key ]['registered ' ] = 0 ;
5959 }
6060 }
61- return $ appsList ;
61+ return $ appsList ;
6262 }
6363
6464 private function getProfilePage () {
@@ -74,11 +74,11 @@ private function getStorageUrl($userId) {
7474 * @NoCSRFRequired
7575 */
7676 public function appLauncher () {
77- $ appsList = $ this ->getAppsList ();
77+ $ appsList = $ this ->getAppsList ();
7878 if (!$ appsList ) {
7979 return new JSONResponse (array (), Http::STATUS_NOT_FOUND );
8080 }
81- $ appLauncherData = array (
81+ $ appLauncherData = array (
8282 "appsListJson " => json_encode ($ appsList ),
8383 "webId " => json_encode ($ this ->getProfilePage ()),
8484 "storageUrl " => json_encode ($ this ->getStorageUrl ($ this ->userId )),
@@ -88,11 +88,11 @@ public function appLauncher() {
8888 )
8989 );
9090 $ templateResponse = new TemplateResponse ('solid ' , 'applauncher ' , $ appLauncherData );
91- $ policy = new ContentSecurityPolicy ();
92- $ policy ->addAllowedStyleDomain ("data: " );
93- $ policy ->addAllowedScriptDomain ("'self' " );
94- $ policy ->addAllowedScriptDomain ("'unsafe-inline' " );
95- $ policy ->addAllowedScriptDomain ("'unsafe-eval' " );
91+ $ policy = new ContentSecurityPolicy ();
92+ $ policy ->addAllowedStyleDomain ("data: " );
93+ $ policy ->addAllowedScriptDomain ("'self' " );
94+ $ policy ->addAllowedScriptDomain ("'unsafe-inline' " );
95+ $ policy ->addAllowedScriptDomain ("'unsafe-eval' " );
9696 $ templateResponse ->setContentSecurityPolicy ($ policy );
9797 return $ templateResponse ;
9898 }
0 commit comments