Prevent specific groups from directly accessing a table
Posted: 2021-01-20 18:51
Hello,
I've tried this code to hide some tables from being accessed by some groups.
Source: https://bigprof.com/blog/appgini/preven ... n-appgini/
Unfortunately, the tables still displayed and I got this error on console:
What is the problem actually?
Thanks.
I've tried this code to hide some tables from being accessed by some groups.
Code: Select all
$mi = getMemberInfo();
// hide the table only if the user belongs to this group
if($mi['group'] == 'Pelajar') {
?>
<script>
console.log('Pelajar group detected');
$j(funtion() {
$j('#Penyelia-tile, #Pembimbing-tile, #Seliaan-tile').remove();
$j('.nav a[href^=Penyelia_view], .nav a[href^=Pembimbing_view], .nav a[href^=Seliaan_view]').remove();
})
</script>
<?php
}
Unfortunately, the tables still displayed and I got this error on console:
Uncaught SyntaxError: missing ) after argument list
What is the problem actually?
Thanks.