-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(maint) Fix to grant_spec.rb regarding database test on earlier machines #966
Conversation
Can you update the title to a more meaningful title and description. |
@@ -1154,7 +1154,7 @@ Manages grant-based access privileges for users, wrapping the `postgresql::serve | |||
|
|||
##### `ensure` | |||
|
|||
Specifies whether to grant or revoke the privilege. Default is to grant the privilege. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may require more information that stating it will create problems. Jean will give you some help writing this section or ensure to get it reviewed by Jean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great update. We will get it reviewed by Jean to ensure its ok. I would add that revoke works on tables, the limit is only on revoke permissions on the database or something along them lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to:
Specifies whether to grant or revoke the privilege. The value 'present' grants the privilege, and 'absent' revokes the privilege. Revoke or 'absent' works only in PostgreSQL version 9.1.24 or later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix for the noted line.
@jbondpdx Is this fine??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you specify below what the default is and what each value does, I think we can delete the bit in the paragraph about what the default does. So the final should be:
Specifies whether to grant or revoke the privilege. Revoke or 'absent' works only in PostgreSQL version 9.1.24 or later.
@jbondpdx Forgot about that, fixed :) |
Nice one David. |
The database test has issues on machines with postgresql version's prior to '9.1.24'.
This is due to the fact that the functions implement by '#891', i.e. 'ensure => absent uses REVOKE instead of GRANT' was not implemented in postgresql databases until this version. No issue has arisen with the use of revoke on separate tables however so the test's involving them have been left alone.
This PR introduces an exemption on the specified test that prevent's it from being run against machines that do not support it and a warning has been included within the readme file.