Struct git_repository::Permissions
source · pub struct Permissions {
pub env: Environment,
pub config: Config,
}
Expand description
Permissions associated with various resources of a git repository
Fields§
§env: Environment
Permissions related to the environment
config: Config
Permissions related to the handling of git configuration.
Implementations§
source§impl Permissions
impl Permissions
sourcepub fn secure() -> Self
pub fn secure() -> Self
Return permissions that will not include configuration files not owned by the current user, but trust system and global configuration files along with those which are owned by the current user.
This allows to read and write repositories even if they aren’t owned by the current user, but avoid using
anything else that could cause us to write into unknown locations or use programs beyond our PATH
.
Trait Implementations§
source§impl Clone for Permissions
impl Clone for Permissions
source§fn clone(&self) -> Permissions
fn clone(&self) -> Permissions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Permissions
impl Debug for Permissions
source§impl Default for Permissions
impl Default for Permissions
source§impl DefaultForLevel for Permissions
impl DefaultForLevel for Permissions
source§fn default_for_level(level: Trust) -> Self
fn default_for_level(level: Trust) -> Self
Produce a default value for the given trust
level
.