HomePhorge

Move owner management into providers
f93251172ca7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Move owner management into providers

Previously, the logic for getting and setting the owner of a file,
including validating owner names, detecting if the property is in
sync, and detecting if we are running as root (and can manage file
ownership) was spread across the owner property (type) and file
providers.

This commit changes the owner property (type) to only perform logic
that is common across all file providers and to delegate to its
provider for operations that are platform-specific. Examples of the
former are detecting if the properties are in sync, detecting if we
are running as root, and overriding the is_to_s and should_to_s
methods (for displaying owners as strings). Examples of the latter are
mapping owner names to user ids and back, and implementing the 'owner'
and 'owner=' methods.

This commit also changes the group property to always be insync? on
Windows, as this functionality will be implemented in a later commit.

It also re-enables file integration tests that previously had been
failing on Windows due to the lack of file provider support.

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
Josh Cooper <josh@puppetlabs.com>Committed on Sep 27 2011, 7:53 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUf05fc83405f6: Add platform-specific metadata collectors
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUf93251172ca7: Move owner management into providers (authored by Nick Lewis <nick@puppetlabs.com>).Sep 27 2011, 7:53 PM