v20200809 datasetlimit
authorkilian <ksaffran@dks.lu>
Sun, 9 Aug 2020 20:09:19 +0000 (22:09 +0200)
committerkilian <ksaffran@dks.lu>
Sun, 9 Aug 2020 20:09:19 +0000 (22:09 +0200)
website/app/tmpl/module/index/index.js

index b0f8eac..28b5c32 100644 (file)
@@ -17,9 +17,14 @@ let index = {
     index.getDataSets();
   },
   getDataSets(){
+    /*[% IF (session.usergroup == 'admin ') %] */
     postData("db.cgi",{"get":"schemata","schemata":"public"}).then(data => {
       form.fillselectlist(index.choices["current_schemata"],data.result.sqldata,'schemaname','company');
-      
     });
+    /* [% ELSE %] */
+    postData("db.cgi",{"get":"userschemaaccess","schemata":"public","filter":" id_user=[% session.id %]"}).then(data => {
+      form.fillselectlist(index.choices["current_schemata"],data.result.sqldata,'schemaname','datasetname');
+    });
+    /* [% END %] */
   }
 }
\ No newline at end of file