mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Stop service modal form disabling services for read-only admin (#4994)
This commit is contained in:
committed by
Tony Murray
parent
7061acf508
commit
1acd938fc1
@@ -10,11 +10,7 @@
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if (is_admin() === false) {
|
||||
die('ERROR: You need to be admin');
|
||||
}
|
||||
|
||||
if (is_admin() !== false) {
|
||||
?>
|
||||
|
||||
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="Delete" aria-hidden="true">
|
||||
@@ -30,7 +26,9 @@ if (is_admin() === false) {
|
||||
<div class="modal-footer">
|
||||
<form role="form" class="remove_token_form">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-danger danger" id="service-removal" data-target="service-removal">Delete</button>
|
||||
<button type="submit" class="btn btn-danger danger" id="service-removal"
|
||||
data-target="service-removal">Delete
|
||||
</button>
|
||||
<input type="hidden" name="service_id" id="service_id" value="">
|
||||
<input type="hidden" name="confirm" id="confirm" value="yes">
|
||||
</form>
|
||||
@@ -73,3 +71,6 @@ $('#service-removal').click('', function(e) {
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user