Skip to content

Commit

Permalink
g3proxy: make cache-file option in user-group source config optional
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed Nov 22, 2024
1 parent 6add25a commit 1a32ad8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions g3proxy/doc/configuration/user_group/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The keys used in *map* format are:

* cache_file

**required**, **type**: :ref:`file path <conf_value_file_path>`
**deprecated**, **type**: :ref:`file path <conf_value_file_path>`

The local file to cache results, it will be used during initial load of the user group.

Expand Down Expand Up @@ -155,7 +155,7 @@ The keys used in *map* format are:

* cache_file

**required**, **type**: :ref:`file path <conf_value_file_path>`
**deprecated**, **type**: :ref:`file path <conf_value_file_path>`

The local file to cache results, it will be used during initial load of the user group.

Expand Down
3 changes: 0 additions & 3 deletions g3proxy/src/config/auth/source/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ impl UserDynamicLuaSource {
if self.fetch_script.as_os_str().is_empty() {
return Err(anyhow!("no fetch script is set"));
}
if self.cache_file.as_os_str().is_empty() {
return Err(anyhow!("no cache file is set"));
}

Ok(())
}
Expand Down
3 changes: 0 additions & 3 deletions g3proxy/src/config/auth/source/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ impl UserDynamicPythonSource {
if self.script_file.as_os_str().is_empty() {
return Err(anyhow!("no script is set"));
}
if self.cache_file.as_os_str().is_empty() {
return Err(anyhow!("no cache file is set"));
}

Ok(())
}
Expand Down

0 comments on commit 1a32ad8

Please sign in to comment.