Skip to content

Commit

Permalink
Remove low-priv users from list of grant options
Browse files Browse the repository at this point in the history
  • Loading branch information
zerocrates committed Feb 12, 2020
1 parent 27061f4 commit 804da1b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions views/shared/exhibit_layouts/editorial-block/form.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<?php
$db = get_db();
$formStem = $block->getFormStem();
$options = $block->getOptions();
$usersForSelect = get_table_options('User');
unset($usersForSelect['']);
$allowedRoles = array('super', 'admin', 'contributor');

$userSelect = $db->getTable('User')->getSelectForFindBy();
$userSelect->reset(Zend_Db_Select::COLUMNS);
$userSelect->from(array(), array('users.id', 'users.name'));
$userSelect->where("role IN ('super', 'admin', 'contributor')");
$usersForSelect = $db->fetchPairs($userSelect);

$currentUser = current_user();


Expand All @@ -11,7 +18,6 @@
$changeAllowed = false;

if ($block->exists()) {
$db = get_db();
$blockInfoTable = $db->getTable('EditorialBlockInfo');

$infoRecord = $blockInfoTable->findByBlock($block);
Expand Down

0 comments on commit 804da1b

Please sign in to comment.