Rename webcontrol_parms to webcontrol_access

This commit is contained in:
MrDave
2026-04-13 18:22:48 -07:00
parent 7aa1436990
commit 2fe6674966
25 changed files with 61 additions and 59 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ movie_filename %v-%{movienbr}-%Y%m%d%H%M%S
;*************************************************
webcontrol_port 8080
webcontrol_localhost on
webcontrol_parms 2
webcontrol_access 2
;*************************************************
;***** Web Stream
+8 -8
View File
@@ -433,7 +433,7 @@
<td bgcolor="#edf4f9" ><a href="#webcontrol_port" >webcontrol_port</a> </td>
<td bgcolor="#edf4f9" ><a href="#webcontrol_ipv6" >webcontrol_ipv6</a> </td>
<td bgcolor="#edf4f9" ><a href="#webcontrol_localhost" >webcontrol_localhost</a> </td>
<td bgcolor="#edf4f9" ><a href="#webcontrol_parms" >webcontrol_parms</a> </td>
<td bgcolor="#edf4f9" ><a href="#webcontrol_access" >webcontrol_access</a> </td>
</tr>
<tr>
<td bgcolor="#edf4f9" ><a href="#webcontrol_interface" >webcontrol_interface</a> </td>
@@ -1995,7 +1995,7 @@
<h3><a name="OptDetail_Scripts"></a> Script Execution </h3>
<p></p>
The following applies to all scripts being executed by Motion.
If <a href="#webcontrol_parms">webcontrol_parms</a> is
If <a href="#webcontrol_access">webcontrol_access</a> is
set to a value greater than or equal 3(i.e. the webcontrol allows changes
to scripts), then the program/script must be saved in a subdirectory from
the motion.conf file called 'scripts'. For example, if the
@@ -2356,7 +2356,7 @@
</ul>
<p></p>
<h3><a name="webcontrol_parms"></a> webcontrol_parms </h3>
<h3><a name="webcontrol_access"></a> webcontrol_access </h3>
<ul>
<li> Values: 0 - 3 | Default: 2 </li>
Set the type of parameters that can be accessed via the webcontrol page.
@@ -2367,7 +2367,7 @@
typically require Motion to be restarted to become effective.</li>
<li> 3: Restricted - User IDs, passwords and "on_" commands.</li>
</ul>
webcontrol_parms is not shown or allowed to be revised from the web interface. This
webcontrol_access is not shown or allowed to be revised from the web interface. This
allows users to lock out any changes to parameters. This may be desired if the
webcontrol port is opened to the internet.
</ul>
@@ -2395,7 +2395,7 @@
<ul>
<li> Values: String | Default: Not defined</li>
The admin username and password specified as username:password
This user has all the permissions granted by the webcontrol_parms
This user has all the permissions granted by the webcontrol_access
and webcontrol_actions.
</ul>
<p></p>
@@ -2460,7 +2460,7 @@
</ul>
Specify each of these using values of `on` or `off` to permit or deny respectively. The specification in
this parameter will override the default that is associated with
<a href="#webcontrol_parms">webcontrol_parms</a>.
<a href="#webcontrol_access">webcontrol_access</a>.
</ul>
<p></p>
@@ -2498,7 +2498,7 @@
Script to execute when a lockout has been triggered. Two additional parameters are passed to this script
when executed. The number of times the userid failed as well as the IP address attempting to log in.
<p></p>
If <a href="#webcontrol_parms">webcontrol_parms</a> is
If <a href="#webcontrol_access">webcontrol_access</a> is
set to a value greater than or equal 3(i.e. the webcontrol allows changes
to scripts), then the program/script must be saved in a subdirectory from
the motion.conf file called 'scripts'. For example, if the
@@ -2803,7 +2803,7 @@
<h3><a name="OptDetail_Tracking"></a>Tracking</h3>
<p></p>
The following applies to all scripts being executed by Motion.
If <a href="#webcontrol_parms">webcontrol_parms</a> is
If <a href="#webcontrol_access">webcontrol_access</a> is
set to a value greater than or equal 3(i.e. the webcontrol allows changes
to scripts), then the program/script must be saved in a subdirectory from
the motion.conf file called 'scripts'. For example, if the
+4 -4
View File
@@ -278,7 +278,7 @@
just a single port in the <code>motion.conf</code> file and that will
provide control and access to all the cameras on that port. Users
can control which configuration parameters can be updated or changed
using the <code>webcontrol_parms</code> configuration option and also
using the <code>webcontrol_access</code> configuration option and also
change which actions are permitted using the
<code>webcontrol_actions</code> configuration option.
<p></p>
@@ -294,16 +294,16 @@
The following example illustrates having all the cameras available
and being able to be controlled on port 8080 but on port 8081
the user would only be able to view the parameters and perform
actions since the webcontrol_parms was set to zero. </li>
actions since the webcontrol_access was set to zero. </li>
<code>motion.conf</code>
<ul>
<li><code>webcontrol_port 8080</code></li>
<li><code>webcontrol_parms 3</code></li>
<li><code>webcontrol_access 3</code></li>
</ul>
<code>camera1.conf</code>
<ul>
<li><code>webcontrol_port 8081</code></li>
<li><code>webcontrol_parms 0</code></li>
<li><code>webcontrol_access 0</code></li>
</ul>
<p></p>
The following illustrates the availble streams
+1 -1
View File
@@ -1457,7 +1457,7 @@ Restrict control connections to localhost only
.RE
.TP
.B webcontrol_parms
.B webcontrol_access
.RS
.nf
Values:
+2 -2
View File
@@ -750,11 +750,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ugyldig webcontrol-parms %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.cpp
+2 -2
View File
@@ -753,11 +753,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ungültige Webcontrol-Parameter %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "Webcontrol-Parameter"
#: src/conf.cpp
+2 -2
View File
@@ -753,11 +753,11 @@ msgstr "servidor local de control web"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Parámetros de control web no válidos %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "parámetros de control web"
#: src/conf.cpp
+2 -2
View File
@@ -750,11 +750,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Virheellinen webcontrol parms %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.cpp
+2 -2
View File
@@ -754,11 +754,11 @@ msgstr "hôte local de contrôle Web"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Paramètres de contrôle Web non valides %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "paramètres de contrôle Web"
#: src/conf.cpp
+2 -2
View File
@@ -753,11 +753,11 @@ msgstr "host locale di controllo web"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Parametri webcontrol %d non validi"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.cpp
+2 -2
View File
@@ -752,11 +752,11 @@ msgstr "ウェブコントロールのローカルホスト"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "無効な Web コントロール パラメータ %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "ウェブ制御パラメーター"
#: src/conf.cpp
+2 -2
View File
@@ -750,11 +750,11 @@ msgstr "웹 컨트롤 로컬 호스트"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "잘못된 웹 컨트롤 매개변수 %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "웹 컨트롤 매개변수"
#: src/conf.cpp
+2 -2
View File
@@ -753,11 +753,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ungültige Webcontrol-Parameter %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "Webcontrol-Parameter"
#: src/conf.cpp
+2 -2
View File
@@ -750,11 +750,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ongeldige webcontroleparms %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.cpp
+2 -2
View File
@@ -750,11 +750,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ugyldig webkontroll-parms %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.cpp
+2 -2
View File
@@ -752,11 +752,11 @@ msgstr "host local de controle da web"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Parâmetros de webcontrol inválidos %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "parâmetros de controle da web"
#: src/conf.cpp
+1 -1
View File
@@ -471,7 +471,7 @@ msgid "webcontrol_localhost"
msgstr "webcontrol localhost"
#: src/conf.c
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.c
+2 -2
View File
@@ -750,11 +750,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ogiltig webcontrol parms %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "webcontrol parms"
#: src/conf.cpp
+2 -2
View File
@@ -754,11 +754,11 @@ msgstr "webcontrol localhost"
#: src/conf.cpp
#, c-format
msgid "Invalid webcontrol_parms %d"
msgid "Invalid webcontrol_access %d"
msgstr "Ungültige Webcontrol-Parameter %d"
#: src/conf.cpp
msgid "webcontrol_parms"
msgid "webcontrol_access"
msgstr "Webcontrol-Parameter"
#: src/conf.cpp
+10 -8
View File
@@ -141,7 +141,7 @@ ctx_parm config_parms[] = {
{"webcontrol_base_path", PARM_TYP_STRING, PARM_CAT_13, PARM_LVL_02, PARM_CHG_RESTART },
{"webcontrol_ipv6", PARM_TYP_BOOL, PARM_CAT_13, PARM_LVL_02, PARM_CHG_RESTART },
{"webcontrol_localhost", PARM_TYP_BOOL, PARM_CAT_13, PARM_LVL_02, PARM_CHG_RESTART },
{"webcontrol_parms", PARM_TYP_LIST, PARM_CAT_13, PARM_LVL_99, PARM_CHG_RESTART},
{"webcontrol_access", PARM_TYP_LIST, PARM_CAT_13, PARM_LVL_99, PARM_CHG_RESTART},
{"webcontrol_interface", PARM_TYP_LIST, PARM_CAT_13, PARM_LVL_02, PARM_CHG_RESTART },
{"webcontrol_auth_method", PARM_TYP_LIST, PARM_CAT_13, PARM_LVL_04, PARM_CHG_RESTART },
{"webcontrol_auth_admin", PARM_TYP_STRING, PARM_CAT_13, PARM_LVL_04, PARM_CHG_RESTART },
@@ -248,6 +248,8 @@ ctx_parm_depr config_parms_depr[] = {
,"\"stream_preview_params\" replaced with \"stream_allcam_params\""}
,{"webcontrol_authentication", "5.0.0","webcontrol_auth_admin"
,"\"webcontrol_authentication\" replaced with \"webcontrol_auth_admin\""}
,{"webcontrol_parms", "5.0.0","webcontrol_access"
,"\"webcontrol_parms\" replaced with \"webcontrol_access\""}
,{ "","","",""}
};
@@ -2050,27 +2052,27 @@ void cls_config::edit_webcontrol_localhost(std::string &parm, enum PARM_ACT pact
MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_localhost",_("webcontrol_localhost"));
}
void cls_config::edit_webcontrol_parms(std::string &parm, enum PARM_ACT pact)
void cls_config::edit_webcontrol_access(std::string &parm, enum PARM_ACT pact)
{
int parm_in;
if (pact == PARM_ACT_DFLT) {
webcontrol_parms = PARM_LVL_02;
webcontrol_access = PARM_LVL_02;
} else if (pact == PARM_ACT_SET) {
parm_in = atoi(parm.c_str());
if ((parm_in < PARM_LVL_00) || (parm_in > PARM_LVL_04)) {
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, _("Invalid webcontrol_parms %d"),parm_in);
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, _("Invalid webcontrol_access %d"),parm_in);
} else {
webcontrol_parms = parm_in;
webcontrol_access = parm_in;
}
} else if (pact == PARM_ACT_GET) {
parm = std::to_string(webcontrol_parms);
parm = std::to_string(webcontrol_access);
} else if (pact == PARM_ACT_LIST) {
parm = "[";
parm = parm + "\"0\",\"1\",\"2\",\"3\",\"4\"";
parm = parm + "]";
}
return;
MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_parms",_("webcontrol_parms"));
MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO,"%s:%s","webcontrol_access",_("webcontrol_access"));
}
void cls_config::edit_webcontrol_interface(std::string &parm, enum PARM_ACT pact)
@@ -3067,7 +3069,7 @@ void cls_config::edit_cat13(std::string parm_nm, std::string &parm_val, enum PAR
} else if (parm_nm == "webcontrol_base_path") { edit_webcontrol_base_path(parm_val, pact);
} else if (parm_nm == "webcontrol_ipv6") { edit_webcontrol_ipv6(parm_val, pact);
} else if (parm_nm == "webcontrol_localhost") { edit_webcontrol_localhost(parm_val, pact);
} else if (parm_nm == "webcontrol_parms") { edit_webcontrol_parms(parm_val, pact);
} else if (parm_nm == "webcontrol_access") { edit_webcontrol_access(parm_val, pact);
} else if (parm_nm == "webcontrol_interface") { edit_webcontrol_interface(parm_val, pact);
} else if (parm_nm == "webcontrol_auth_method") { edit_webcontrol_auth_method(parm_val, pact);
} else if (parm_nm == "webcontrol_auth_admin") { edit_webcontrol_auth_admin(parm_val, pact);
+2 -2
View File
@@ -227,7 +227,7 @@
std::string webcontrol_base_path;
bool webcontrol_ipv6;
bool webcontrol_localhost;
int webcontrol_parms;
int webcontrol_access;
std::string webcontrol_interface;
std::string webcontrol_auth_method;
std::string webcontrol_auth_admin;
@@ -477,7 +477,7 @@
void edit_webcontrol_lock_attempts(std::string &parm, enum PARM_ACT pact);
void edit_webcontrol_lock_minutes(std::string &parm, enum PARM_ACT pact);
void edit_webcontrol_lock_script(std::string &parm, enum PARM_ACT pact);
void edit_webcontrol_parms(std::string &parm, enum PARM_ACT pact);
void edit_webcontrol_access(std::string &parm, enum PARM_ACT pact);
void edit_webcontrol_port(std::string &parm, enum PARM_ACT pact);
void edit_webcontrol_tls(std::string &parm, enum PARM_ACT pact);
+1 -1
View File
@@ -695,7 +695,7 @@ void util_exec_base(cls_motapp *p_app, std::string rslt)
scripts, then limit the location of file being executed
to the scripts subdirectory
*/
if (p_app->cfg->webcontrol_parms >= PARM_LVL_03) {
if (p_app->cfg->webcontrol_access >= PARM_LVL_03) {
cmd_tmp = p_app->cfg->conf_filename.substr(0
, p_app->cfg->conf_filename.find_last_of("/"));
cmd_tmp += "/scripts/" + cmd_nm;
+1 -1
View File
@@ -376,7 +376,7 @@ void cls_webu::init_actions()
wb_actions = new ctx_params;
util_parms_parse(wb_actions,"webcontrol_actions", cfg->webcontrol_actions);
if (cfg->webcontrol_parms == 0) {
if (cfg->webcontrol_access == 0) {
parm_vl = "off";
} else {
parm_vl = "on";
+2 -2
View File
@@ -105,7 +105,7 @@ void cls_webu_json::parms_item(cls_config *conf, int indx_parm)
parm_val = "";
parm_list = "";
if (webu->cfg->webcontrol_parms < PARM_LVL_01) {
if (webu->cfg->webcontrol_access < PARM_LVL_01) {
parm_enable = "false";
} else {
parm_enable = "true";
@@ -201,7 +201,7 @@ void cls_webu_json::parms_one(cls_config *conf)
}
/* Allow limited parameters to be read only to the web page */
if ((config_parms[indx_parm].parm_lvl >
webu->cfg->webcontrol_parms) &&
webu->cfg->webcontrol_access) &&
(config_parms[indx_parm].parm_lvl > PARM_LVL_01)) {
webua->resp_page +=
+2 -2
View File
@@ -642,10 +642,10 @@ void cls_webu_post::config()
indx2++;
}
/* Ignore any requests for parms above webcontrol_parms level. */
/* Ignore any requests for parms above webcontrol_access level. */
indx2=0;
while (config_parms[indx2].parm_name != "") {
if ((config_parms[indx2].parm_lvl > app->conf_src->webcontrol_parms) ||
if ((config_parms[indx2].parm_lvl > app->conf_src->webcontrol_access) ||
(config_parms[indx2].parm_lvl == PARM_LVL_99) ) {
indx2++;
continue;