GitXplorerGitXplorer
t

pg-priv

public
4 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
7a360419dc093c5f2ca0a801528364f8e4722615

repository metadata fix

ddsteinbrunner committed 11 years ago
Unverified
090c8f8d9fd1d94583e2d2382d0a35fe8eac3532

Increment to v0.13.

ttheory committed 12 years ago
Unverified
92c420922ec66b2a68d2dbbfac6224a89ce7a2d7

Timestamp v0.12.

ttheory committed 12 years ago
Unverified
9f4d74a629214bae4ebd6643c6f3fe4af96b95a5

Fix failing test on 5.17 due to hash order randomization.

ttheory committed 12 years ago
Unverified
f3ccbb9a4f6b27d4f84801f3e1d461566a282ab7

Drop support for Perl 5.6.

ttheory committed 12 years ago
Unverified
bf5e32329bc40e398fd09d9b20f9fca4e20bd513

Increment to v0.12.

ttheory committed 12 years ago

README

The README file for this repository.

Pg/Priv version 0.13

This module parses PostgreSQL ACL arrays and represents the underlying privileges as objects. Use accessors on the objects to see what privileges are granted by whom and to whom.

PostgreSQL ACLs are arrays of strings. Each string represents a single set of privileges granted by one role to another role. ACLs look something like this:

my $acl = [
   'miriam=arwdDxt/miriam',
   '=r/miriam',
   'admin=arw/miriam',
];

The format of the privileges are interpreted thus (borrowed from the PostgreSQL Documentation):

   rolename=xxxx -- privileges granted to a role
           =xxxx -- privileges granted to PUBLIC

               r -- SELECT ("read")
               w -- UPDATE ("write")
               a -- INSERT ("append")
               d -- DELETE
               D -- TRUNCATE
               x -- REFERENCES
               t -- TRIGGER
               X -- EXECUTE
               U -- USAGE
               C -- CREATE
               c -- CONNECT
               T -- TEMPORARY
         arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects)
               * -- grant option for preceding privilege

           /yyyy -- role that granted this privilege

Pg::Priv uses these rules (plus a few other gotchas here and there) to parse these privileges into objects. The above three privileges in the ACL array would thus be returned by parse_acl() as three Pg::Priv objects that you could then interrogate.

INSTALLATION

To install this module, type the following:

perl Build.PL
./Build
./Build test
./Build install

Dependencies

Pg::Prive requires no non-core Perl modules.

Copyright and Licence

Copyright (c) 2009 Etsy, Inc. and David. E. Wheeler. Some Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.