Re: [nmsinc] Help with Author settings
Hi,
Yes, that would stop editors from seeing everything.
Here is another approach. You can use PHP if statements to dynamically alter your sql query
NOTE: this example assumes that you are giving the user a permission level for ALL sections, not apply permissions one section at a time.
Try this:
<?php
$accessLevel = @$CURRENT_USER['accessList']['all']['accessLevel'];
$where = "";
if ($accessLevel == 6 || $accessLevel == 7) {
$where = "WHERE createdByUserNum = '".$CURRENT_USER['num']."'";
}
?>
SELECT num, title
FROM `<?php echo $TABLE_PREFIX ?>news`
<?php echo $where; ?>
If the logged in user is set to author or author & viewer, they will only see records they created as options. Otherwise, they'll see everything.
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/