Ed Howland
2007-Mar-26 15:25 UTC
[Masterview-users] Configure admin pages to allow access from non-localhost
The documentation on the website says: Built-in local machine check (local_request?) Defines custom MV Admin authorization method and module. Automatically loads app/masterview/admin_auth_mixin.rb if present. config.admin_auth_mixin = { :file => ''admin_auth_mixin'', # require file in app/masterview :file_loc => nil # :RAILS_ROOT or root dir path for alt load load :module => :MasterViewAdminAuthMixin, # mixin module name } see examples/rails_app_admin_auth/auth_local_request_mixin.rb for more details But this file doesn''t exist in my examples folder. What should admin_auth_mixin do to allow access from non-local hosts? Thanks Ed -- Ed Howland http://greenprogrammer.blogspot.com
Jeff Barczewski
2007-Mar-26 19:20 UTC
[Masterview-users] Configure admin pages to allow access from non-localhost
On 3/26/07, Ed Howland <ed.howland at gmail.com> wrote:> > The documentation on the website says: > > Built-in local machine check (local_request?) Defines custom MV Admin > authorization method and module. > Automatically loads app/masterview/admin_auth_mixin.rb if present. > > config.admin_auth_mixin = { > :file => ''admin_auth_mixin'', # require file in app/masterview > :file_loc => nil # :RAILS_ROOT or root dir path for alt load load > :module => :MasterViewAdminAuthMixin, # mixin module name > } > > see examples/rails_app_admin_auth/auth_local_request_mixin.rb for > more details > > But this file doesn''t exist in my examples folder.I have to check the build to see you are not getting the file. What should admin_auth_mixin do to allow access from non-local hosts?> >The file is attached. Let me know if you need any additional info. You can basically change out the logic in allow_access? to do whatever checking you want. It is mixed into to the controller so it has access to all of the controller''s data. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070326/08320e5c/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: admin_auth_mixin.rb Type: application/octet-stream Size: 1652 bytes Desc: not available Url : http://rubyforge.org/pipermail/masterview-users/attachments/20070326/08320e5c/attachment-0001.obj