mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
parent
ea080feac8
commit
a621cbc6a7
|
@ -42,16 +42,16 @@ You will also need a config file in the volume named `server.toml` (Within the c
|
|||
#
|
||||
# The role of this server. This affects features available and how replication may interact.
|
||||
# Valid roles are:
|
||||
# - write_replica
|
||||
# - WriteReplica
|
||||
# This server provides all functionality of Kanidm. It allows authentication, writes, and
|
||||
# the web user interface to be served.
|
||||
# - write_replica_no_ui
|
||||
# This server is the same as a write_replica, but does NOT offer the web user interface.
|
||||
# - read_only_replica
|
||||
# - WriteReplicaNoUI
|
||||
# This server is the same as a WriteReplica, but does NOT offer the web user interface.
|
||||
# - ReadOnlyReplica
|
||||
# This server will not writes initiated by clients. It supports authentication and reads,
|
||||
# and must have a replication agreement as a source of it's data.
|
||||
# Defaults to "write_replica".
|
||||
# role = "write_replica"
|
||||
# Defaults to "WriteReplica".
|
||||
# role = "WriteReplica"
|
||||
|
||||
An example is located in [examples/server.toml](../../examples/server.toml).
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
FROM opensuse/leap:latest
|
||||
MAINTAINER william@blackhats.net.au
|
||||
LABEL org.opencontainers.image.authors="william@blackhats.net.au"
|
||||
|
||||
EXPOSE 1812 1813
|
||||
|
||||
|
|
|
@ -33,6 +33,16 @@ impl Default for ServerRole {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToString for ServerRole {
|
||||
fn to_string(&self) -> String {
|
||||
match self {
|
||||
ServerRole::WriteReplica => "write replica".to_string(),
|
||||
ServerRole::WriteReplicaNoUI => "write replica (no ui)".to_string(),
|
||||
ServerRole::ReadOnlyReplica => "read only replica".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for ServerRole {
|
||||
type Err = &'static str;
|
||||
|
||||
|
@ -85,6 +95,7 @@ impl fmt::Display for Configuration {
|
|||
Some(u) => write!(f, "with log_level: {:x}, ", u),
|
||||
None => write!(f, "with log_level: default, "),
|
||||
})
|
||||
.and_then(|_| write!(f, "role: {}, ", self.role.to_string()))
|
||||
.and_then(|_| {
|
||||
write!(
|
||||
f,
|
||||
|
|
Loading…
Reference in a new issue