puppetlabs/puppet-dashboard — pull request #87 by lifton (2012-02-14 23:52:55+00:00)
Title: Add read-only access control hooks for Rack middleware

Prior to this commit, Dashboard could be put into a read-only mode by
setting a flag in a configuration file. This commit extends this
ability to Rack middleware. Specfically, Rack middleware can put
Dashboard into read-only mode by declaring something like:

env['rack.session']['ACCESS_CONTROL_ROLE'] = 'READ_ONLY'

Prior to this commit, there were no tests for the read-only
configuration flag. This commit adds tests for both methods of making
Dashboard read-only. All tests pass. In addition, both read-only
methods have been tested in a live environment.