Skip to content

Commit 187656f

Browse files
Merge branch 'v132' of github.com:jaredhendrickson13/pfsense-api into v132
2 parents 6ef1022 + 4ebe3fb commit 187656f

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

pfSense-pkg-API/files/etc/inc/api/models/APIUserCreate.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ class APIUserCreate extends APIModel {
201201
public function is_user_certificate($cert_ref_id) {
202202
# Loop through all certificates and check for matches
203203
foreach ($this->config["cert"] as $cert) {
204-
# Check if this is a user certificate and that ref ID matches
205-
if ($cert["type"] === "user" and $cert["refid"] === $cert_ref_id) {
204+
# Check if this certificate matches the specified ref id
205+
if ($cert["refid"] === $cert_ref_id) {
206206
return true;
207207
}
208208
}

pfSense-pkg-API/files/etc/inc/api/models/APIUserUpdate.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ class APIUserUpdate extends APIModel {
179179
public function is_user_certificate($cert_ref_id) {
180180
# Loop through all certificates and check for matches
181181
foreach ($this->config["cert"] as $cert) {
182-
# Check if this is a user certificate and that ref ID matches
183-
if ($cert["type"] === "user" and $cert["refid"] === $cert_ref_id) {
182+
# Check if this certificate matches the specified ref id
183+
if ($cert["refid"] === $cert_ref_id) {
184184
return true;
185185
}
186186
}
187187

188188
return false;
189+
189190
}
190191
}

pfSense-pkg-API/files/usr/local/www/api/documentation/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,12 +2315,12 @@
23152315
function IsJsonString(str){try{JSON.parse(str);}catch(e){return false;}
23162316
return true;}
23172317
String.prototype.replaceAll=function(replaceThis,withThis){var re=new RegExp(RegExp.quote(replaceThis),"g");return this.replace(re,withThis);};RegExp.quote=function(str){return str.replace(/([.?*+^$[\]\\(){}-])/g,"\\$1");};function syntaxHighlight(json){json=json.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,function(match){var cls='number';if(/^"/.test(match)){if(/:$/.test(match)){cls='key';}else{cls='string';}}else if(/true|false/.test(match)){cls='boolean';}else if(/null/.test(match)){cls='null';}
2318-
return '<span class="'+cls+'">'+match+'</span>';});}</script><br><br><footer class="navbar-default navbar-fixed-bottom"><div class=container-fluid><div class="span12 text-center"><span data-toggle=tooltip title="If the application help you, please feel free to give a star to the project in github. Your star inspire me to work more on open-source projects like this!">Made with <em class=love-color>&#9829;</em> by <a href=https://github.com/thedevsaddam target=_blank class=text-muted>thedevsaddam</a> | Generated at: 2021-10-04 13:17:07 by <a href=https://github.com/thedevsaddam/docgen target=_blank class=text-muted>docgen</a></span></div></div></footer>
2318+
return '<span class="'+cls+'">'+match+'</span>';});}</script><br><br><footer class="navbar-default navbar-fixed-bottom"><div class=container-fluid><div class="span12 text-center"><span data-toggle=tooltip title="If the application help you, please feel free to give a star to the project in github. Your star inspire me to work more on open-source projects like this!">Made with <em class=love-color>&#9829;</em> by <a href=https://github.com/thedevsaddam target=_blank class=text-muted>thedevsaddam</a> | Generated at: 2021-10-18 16:28:46 by <a href=https://github.com/thedevsaddam/docgen target=_blank class=text-muted>docgen</a></span></div></div></footer>
23192319
<script type="text/javascript">
23202320
$(document).ready(function() {
23212321
document.title = 'pfSense REST API Documentation';
23222322
var curr_year = new Date().getFullYear();
2323-
document.querySelector('footer').innerHTML = "<a href='/api/'>Back to pfSense</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api'>View on Github</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api/issues/new'>Report an Issue</a><p>Copyright &copy; " + curr_year + " - Jared Hendrickson</p>";
2323+
document.querySelector('footer').innerHTML = "<a href='/api/'>Back to pfSense</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api'>View on Github</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api/issues/new/choose'>Report an Issue</a><p>Copyright &copy; " + curr_year + " - Jared Hendrickson</p>";
23242324
});
23252325

23262326
</script>

pfSense-pkg-API/files/usr/local/www/api/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
$rotate_btn->setOnclick("return confirm(\"Rotating the server key will void any existng API tokens and JWTs. Proceed?\");");
367367
$form->addGlobal(new Form_Button('save', 'Save', null, 'fa-save'))->addClass('btn btn-sm btn-primary api-save-btn');
368368
(in_array($pkg_config["authmode"], ["token", "jwt"])) ? $form->addGlobal($rotate_btn) : null;
369-
$form->addGlobal(new Form_Button('report', 'Report an Issue', 'https://github.com/jaredhendrickson13/pfsense-api/issues/new', ''))->addClass('fa fa-question-circle api-report');
369+
$form->addGlobal(new Form_Button('report', 'Report an Issue', 'https://github.com/jaredhendrickson13/pfsense-api/issues/new/choose', ''))->addClass('fa fa-question-circle api-report');
370370

371371
# Display the populated configuration form
372372
print $form;

tools/make_documentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
$(document).ready(function() {
128128
document.title = 'pfSense REST API Documentation';
129129
var curr_year = new Date().getFullYear();
130-
document.querySelector('footer').innerHTML = "<a href='/api/'>Back to pfSense</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api'>View on Github</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api/issues/new'>Report an Issue</a><p>Copyright &copy; " + curr_year + " - Jared Hendrickson</p>";
130+
document.querySelector('footer').innerHTML = "<a href='/api/'>Back to pfSense</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api'>View on Github</a> | <a href='https://github.com/jaredhendrickson13/pfsense-api/issues/new/choose'>Report an Issue</a><p>Copyright &copy; " + curr_year + " - Jared Hendrickson</p>";
131131
});
132132
133133
</script>

0 commit comments

Comments
 (0)