Disallowed user creating a new domain
This commit is contained in:
parent
ea9868f908
commit
1f59e8e87c
|
@ -23,6 +23,11 @@ require_once '../lib/soa-mail.php';
|
||||||
|
|
||||||
$input = json_decode(file_get_contents('php://input'));
|
$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") {
|
if(isset($input->action) && $input->action == "addDomain") {
|
||||||
$soaData = Array();
|
$soaData = Array();
|
||||||
$soaData[] = $input->primary;
|
$soaData[] = $input->primary;
|
||||||
|
|
|
@ -84,7 +84,7 @@ limitations under the License.
|
||||||
|
|
||||||
</table>
|
</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>
|
||||||
|
|
||||||
<div class="modal fade" id="deleteConfirm" tabindex="-1" role="dialog">
|
<div class="modal fade" id="deleteConfirm" tabindex="-1" role="dialog">
|
||||||
|
|
Loading…
Reference in a new issue