06-29-2017, 01:28 PM
So there are a few ways to do this, but what you are mainly going to want to do is to wrap the whole edit function in a hasPerm function.
Let's say your table is being created. So in my situation, I only wanted someone with the permission level of admin OR purchaser to be able to see purchase requests that had been closed.
You would do the same thing for your edit button, and it wouldn't show up for anyone who didn't have the permission level of 2(admin)
Let's say your table is being created. So in my situation, I only wanted someone with the permission level of admin OR purchaser to be able to see purchase requests that had been closed.
Code:
<?php if(hasPerm([2,103],$user->data()->id)){ ?>
Code:
<div class="col-sm-3">
Code:
<a class="btn" href="purchaser_all_pr.php?closed=3">Show CLOSED UNRECORDED PRs</a><br>
Code:
</div>
Code:
<?php } ?>
You would do the same thing for your edit button, and it wouldn't show up for anyone who didn't have the permission level of 2(admin)