The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect to another database and edit the rows as admin
#2
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.

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)
  Reply


Messages In This Thread
Connect to another database and edit the rows as admin - by mudmin - 06-29-2017, 01:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)