Disallowed user creating a new domain

This commit is contained in:
Lukas Metzger 2016-01-25 17:18:15 +01:00
parent ea9868f908
commit 1f59e8e87c
2 changed files with 6 additions and 1 deletions

View file

@ -23,6 +23,11 @@ require_once '../lib/soa-mail.php';
$input = json_decode(file_get_contents('php://input'));
if(!isset($_SESSION['type']) || $_SESSION['type'] != "admin") {
echo "Permission denied!";
exit();
}
if(isset($input->action) && $input->action == "addDomain") {
$soaData = Array();
$soaData[] = $input->primary;

View file

@ -84,7 +84,7 @@ limitations under the License.
</table>
<a class="btn btn-success" href="add-domain.php">Add</a>
<?php if($_SESSION['type'] == "admin") echo '<a class="btn btn-success" href="add-domain.php">Add</a>'; ?>
</div>
<div class="modal fade" id="deleteConfirm" tabindex="-1" role="dialog">