2013-08-27 22:43:47 +02:00
|
|
|
# This resource wraps the grant resource to manage table grants specifically.
|
|
|
|
# See README.md for more details.
|
|
|
|
define postgresql::server::table_grant(
|
2013-07-16 21:30:39 +02:00
|
|
|
$privilege,
|
|
|
|
$table,
|
|
|
|
$db,
|
|
|
|
$role,
|
2014-04-17 21:09:07 +02:00
|
|
|
$port = $postgresql::server::port,
|
2013-07-16 21:30:39 +02:00
|
|
|
$psql_db = undef,
|
|
|
|
$psql_user = undef
|
|
|
|
) {
|
2013-08-27 22:43:47 +02:00
|
|
|
postgresql::server::grant { "table:${name}":
|
2013-07-16 21:30:39 +02:00
|
|
|
role => $role,
|
|
|
|
db => $db,
|
2014-04-17 21:09:07 +02:00
|
|
|
port => $port,
|
2013-07-16 21:30:39 +02:00
|
|
|
privilege => $privilege,
|
|
|
|
object_type => 'TABLE',
|
|
|
|
object_name => $table,
|
|
|
|
psql_db => $psql_db,
|
|
|
|
psql_user => $psql_user,
|
|
|
|
}
|
|
|
|
}
|