diff options
Diffstat (limited to 'applications/luci-app-radicale2')
4 files changed, 41 insertions, 55 deletions
diff --git a/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua b/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua index 71fd3a32ee..b352bb46aa 100644 --- a/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua +++ b/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua @@ -135,33 +135,19 @@ function encpass(self, section) return encvalue and encvalue.encrypted_password end -pass.parse = function(self, section, novld) - local encvalue - if self:cfgvalue(section) then - if not plainpass:cfgvalue(section) then - return Value.parse(self, section) - else - encvalue = encpass(self, section) - if encvalue then - self.formvalue = function(self, section) - return encvalue - end - return Value.parse(self, section, novld) - else - self.formvalue = self.cfgvalue - return Value.parse(self, section, novld) - end - end +pass.cfgvalue = function(self, section) + if not plainpass:formvalue(section) then + return Value.cfgvalue(self, section) else - encvalue = encpass(self, section) - if encvalue then - self.formvalue = function(self, section) - return encvalue - end - return Value.parse(self, section, novld) - else - return nil - end + return Value.formvalue(self, section) + end +end + +pass.formvalue = function(self, section) + if not plainpass:formvalue(section) then + return Value.formvalue(self, section) + else + return encpass(self, section) or Value.formvalue(self, section) end end diff --git a/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm b/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm index 2f449d7b0b..1bcf388bd6 100644 --- a/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm +++ b/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm @@ -1,7 +1,7 @@ <% local uci = require "luci.model.uci".cursor() local http_port = uci:get("radicale2", "server", "host") -local usessl = uci:get("radicale2", "server", "ssl") +local usessl = uci:get_bool("radicale2", "server", "ssl") if type(http_port) == "table" then http_port = http_port[1] end diff --git a/applications/luci-app-radicale2/po/en/radicale2.po b/applications/luci-app-radicale2/po/en/radicale2.po index 7a1bb2527d..fa7d88559d 100644 --- a/applications/luci-app-radicale2/po/en/radicale2.po +++ b/applications/luci-app-radicale2/po/en/radicale2.po @@ -37,7 +37,7 @@ msgstr "Authentication / Users" msgid "Authentication Type" msgstr "Authentication Type" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:185 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:171 msgid "Based on settings in 'Rights File'" msgstr "Based on settings in 'Rights File'" @@ -85,7 +85,7 @@ msgstr "Default (htpasswd file from users below)" msgid "Default (multifilesystem)" msgstr "Default (multifilesystem)" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:181 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:167 msgid "Default (owner only)" msgstr "Default (owner only)" @@ -114,7 +114,7 @@ msgid "Encoding for storing local collections" msgstr "Encoding for storing local collections" #: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:110 -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:169 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:155 msgid "Encrypted Password" msgstr "Encrypted Password" @@ -142,7 +142,7 @@ msgstr "For verifying client certificates" msgid "General Settings" msgstr "General Settings" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:169 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:155 msgid "" "Generate this field using an generator for Apache htpasswd-style " "authentication files (for the hash format you have chosen above), or install " @@ -299,19 +299,19 @@ msgstr "Private Key" msgid "REMOTE_USER from web server" msgstr "REMOTE_USER from web server" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:186 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:172 msgid "RO: All, RW: All" msgstr "RO: All, RW: All" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:184 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:170 msgid "RO: Authenticated Users, RW: Owner" msgstr "RO: Authenticated Users, RW: Owner" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:183 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:169 msgid "RO: None, RW: Authenticated Users" msgstr "RO: None, RW: Authenticated Users" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:182 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:168 msgid "RO: None, RW: Owner" msgstr "RO: None, RW: Owner" @@ -343,7 +343,7 @@ msgstr "Remove configuration for certificate, key, and CA" msgid "Remove configuration for logging" msgstr "Remove configuration for logging" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:195 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:181 msgid "Remove configuration for rights file" msgstr "Remove configuration for rights file" @@ -359,15 +359,15 @@ msgstr "Required time between a failed authentication attempt and trying again" msgid "Retry Delay" msgstr "Retry Delay" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:176 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:162 msgid "Rights" msgstr "Rights" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:190 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:176 msgid "Rights File" msgstr "Rights File" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:180 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:166 msgid "Rights Type" msgstr "Rights Type" @@ -430,7 +430,7 @@ msgstr "This permanently deletes configuration for logging" msgid "This permanently deletes the cert, key, and configuration to use same." msgstr "This permanently deletes the cert, key, and configuration to use same." -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:196 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:182 msgid "This permanently deletes the rights file and configuration to use same." msgstr "" "This permanently deletes the rights file and configuration to use same." @@ -451,7 +451,7 @@ msgstr "Use Protocol" msgid "User" msgstr "User" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:176 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:162 msgid "User-based ACL Settings" msgstr "User-based ACL Settings" diff --git a/applications/luci-app-radicale2/po/templates/radicale2.pot b/applications/luci-app-radicale2/po/templates/radicale2.pot index be11ff1fe0..40789b0ca0 100644 --- a/applications/luci-app-radicale2/po/templates/radicale2.pot +++ b/applications/luci-app-radicale2/po/templates/radicale2.pot @@ -28,7 +28,7 @@ msgstr "" msgid "Authentication Type" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:185 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:171 msgid "Based on settings in 'Rights File'" msgstr "" @@ -76,7 +76,7 @@ msgstr "" msgid "Default (multifilesystem)" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:181 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:167 msgid "Default (owner only)" msgstr "" @@ -105,7 +105,7 @@ msgid "Encoding for storing local collections" msgstr "" #: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:110 -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:169 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:155 msgid "Encrypted Password" msgstr "" @@ -133,7 +133,7 @@ msgstr "" msgid "General Settings" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:169 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:155 msgid "" "Generate this field using an generator for Apache htpasswd-style " "authentication files (for the hash format you have chosen above), or install " @@ -279,19 +279,19 @@ msgstr "" msgid "REMOTE_USER from web server" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:186 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:172 msgid "RO: All, RW: All" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:184 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:170 msgid "RO: Authenticated Users, RW: Owner" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:183 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:169 msgid "RO: None, RW: Authenticated Users" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:182 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:168 msgid "RO: None, RW: Owner" msgstr "" @@ -323,7 +323,7 @@ msgstr "" msgid "Remove configuration for logging" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:195 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:181 msgid "Remove configuration for rights file" msgstr "" @@ -339,15 +339,15 @@ msgstr "" msgid "Retry Delay" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:176 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:162 msgid "Rights" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:190 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:176 msgid "Rights File" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:180 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:166 msgid "Rights Type" msgstr "" @@ -410,7 +410,7 @@ msgstr "" msgid "This permanently deletes the cert, key, and configuration to use same." msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:196 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:182 msgid "This permanently deletes the rights file and configuration to use same." msgstr "" @@ -430,7 +430,7 @@ msgstr "" msgid "User" msgstr "" -#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:176 +#: applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua:162 msgid "User-based ACL Settings" msgstr "" |