kanbus 0.8.2

High-performance CLI and web console for the Kanbus issue tracker. Includes kanbus (CLI) and kanbus-console (web UI server).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! User identification helpers.

use std::env;

/// Return the current user identifier.
pub fn get_current_user() -> String {
    if let Ok(value) = env::var("KANBUS_USER") {
        if !value.trim().is_empty() {
            return value;
        }
    }
    env::var("USER").unwrap_or_else(|_| "unknown".to_string())
}