Skip to content
Snippets Groups Projects
Commit f5a92f91 authored by Brett Bieber's avatar Brett Bieber
Browse files

Add support for a list of authorized usernames

parent 622a1289
Branches master
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ $options = array(); ...@@ -4,6 +4,7 @@ $options = array();
$options['bind_dn'] = 'uid=youruseridhere,ou=service,dc=unl,dc=edu'; $options['bind_dn'] = 'uid=youruseridhere,ou=service,dc=unl,dc=edu';
$options['bind_password'] = 'passwordhere'; $options['bind_password'] = 'passwordhere';
$authorized_users = array('hhusker0');
function autoload($class) function autoload($class)
{ {
......
...@@ -14,6 +14,12 @@ if (!$auth->isLoggedIn()) { ...@@ -14,6 +14,12 @@ if (!$auth->isLoggedIn()) {
exit; exit;
} }
if (empty($authorized_users)
|| !in_array($auth->getUser(), $authorized_users)) {
echo 'You are not authorized to use this tool. Contact the UNL Identity Management Team.';
exit;
}
echo '<h1>Upload a file containing NUIDs or My.UNL Usernames</h1> echo '<h1>Upload a file containing NUIDs or My.UNL Usernames</h1>
<form action="" method="post" enctype="multipart/form-data"> <form action="" method="post" enctype="multipart/form-data">
File <input type="file" name="userfile" /> File <input type="file" name="userfile" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment