andrewjleavitt/massive-happiness — pull request #3 by lanestevens (2014-01-10 06:41:35+00:00)
Title: This commit:

Issues
=====
* I think that declaring the username in the yml file is a problem. Perhaps a work-around solution to this would be if a yaml file can include a variable that maps to the user (e.g., $USER). I have used $USER in setting up the pg_hba.conf file.
* My preference would be to replace the series of shell statements in the Rakefile with a single call to a bash script that takes the correct configuration variables such as port, database, pgdata and just run the single script. That will keep all of the statements bundled together closest to the files that are involved. I didn't make this change pending your commentary.

1) made some changes in the rake file so that the database would build in
my environment. I don't see how it was building in any other environment
unless some environment variables were set.

2) added a file to create roles. There are 4 roles. Two of the roles are
group roles (limited_access and full_access) and two of the roles are login
roles (limited_user and full_user) that are granted the group roles.

3) added a file to grant access to database objects through roles.

4) messed with the pg_hba.conf file to permit the user owning the database
to login without being challenged for a password, but requires a password
for the two new login users created in the roles.sql.