SVN::Access::Resource - Object representing a SVN Access file resource
use SVN::Access; my $acl = SVN::Access->new(acl_file => '/usr/local/svn/conf/badnews_svn_access.conf'); # grant mikey_g read-write access to / $acl->resource('/')->authorize('mikey_g', rw); # print out users and their authorization for / while (my ($user, $perms) = each(%{$acl->resource('/')->authorized})) { print "$user: $perms\n"; } # revoke access for mikey_g to / $acl->resource->('/')->deauthorize('mikey_g');
SVN::Access::Resource is an object wrapper around a SVN::Access resource.
constructor, the most basic kind, i'm only looking for authorized (hashref), and name.
Example:
my $resource = SVN::Access::Resource->new( name => '/', authorized => { rick => 'rw', # commit access.. randal => 'r', # read only access luthor => '', # explicitly deny access } );
returns a hash reference containing (user, access) pairs.
my %authorized = %{$resource->authorized};
authorizes a user / group for access to this resource. note: if an integer is passed as the last argument, SVN::Access will attempt to store your permissions at that place in the authorized hash.
$resource->authorize('@admins' => 'rw'); # give the admins commit $resource->authorize('*', => 'r'); # give anonymous read only
revokes the user / group's access to this resource.
$resource->deauthorize('rick'); # later, rick.
accessor method that returns the resource's name (path)
subversion (http://subversion.tigris.org/), SVN::ACL, svnserve.conf
Michael Gregorowicz, <mike@mg2.org>
Copyright (C) 2012-2017 by Michael Gregorowicz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install SVN::Access, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVN::Access
CPAN shell
perl -MCPAN -e shell install SVN::Access
For more information on module installation, please visit the detailed CPAN module installation guide.