Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This will be the file_manager that I will maintain going forward

tree: c1d3462c77
README.rdoc

Internet File Manager

Updates 12/06/2010


Please note that this is the version of file_manager that I will maintain going forward. I will update this file to more accurately reflect the changes. But briefly, it is using Devise/Simple Forms/CanCan instead of Authlogic/my own Ryan Bates inspired Labeled Form builder/my own roles management system. Additionally, I have refactored the application to move Admin stuff under the Admin name space for CanCan. I am also in the process of porting the test suite from Shoulda/WebRat/Cucumber to RSpec/Capybara/Cucumber stack.

Enjoy!

Briefly, it lets you organize files in a hierarchy of “Clients -> Folders -> Documents.” The folders can be nested within folders to an arbitrary depth. It comes with four pre-defined roles for users. Each role can have multiple users.

  1. admin - has full access to everything in the application.

  2. leader - can access everything except the administrative sections.

  3. staff - can only access clients/folders for which they have been assigned permissions by the admin

  4. eclient - or External Client - the aforementioned first three roles, i.e., admin, leader, and staff

are considered internal and can access any Clients' account and folders with the caveat that staff users may have restricted permisssions. External client users, on the other hand, can only access their own client accounts (the admin sets up the accounts). There can be multiple user accounts assigned to the same external client.

Setup

  • Git clone the project using the URL from github.

  • config/environment.rb has a list of gems used in the project. If I have missed anything, let me know.

  • There are several plugins used that can be moved to gems. I will do that most likely for the Rails 3 upgrade.

  • The application is setup to use MySQL and has been developed on Ubuntu, though, it has been sparsely tested in Windows.

  • Create MySQL database: I called it file_manager_dev (pick any name and update database.yml accordingly).

  • Run rake db:migrate from Rails root - creates the database schema

  • Run rake db:seed from Rails root - creates seed data in reference tables

  • Run rake db:populate from Rails root - populates the clients and folders tables with example data

Note that the above three commands can be packaged as one rake task, e.g., setup, and I tried (see lib/tasks/application.rake), but for some reason it does not work. May be someone with better knowledge of Rake can point out?

  • Thinking Sphinx setup - I had diabled it for the move to Heroku. I will reenable it but only for Rails 3.

  • To run the Shoulda tests - type rake test from Rails root.

  • to run the Cucumber tests - type cucumber features from Rails root.

The application bootstraps the seed data,e.g., roles, minimum number of users, and a few lookup tables. Feel free to customize them except the roles that are hard-wired in the application at the moment. I am thinking of using Ryan Bates's cancan to centralize authorization logic, but haven't done it yet.

Gems and Plugins

The application uses several useful tools that can be used as a learning example:

References

Tools

  • Vim Excellent screen-casts at peepCode.

  • Books - too many to mention here :) www.amazon.com

Demo App (Please note that the demo app still uses Rails 2.3.5, so try it only for testing purposes)

I have deployed a demo app on Heroku at the following URL: empty-fog-47.heroku.com login with the following userid/password combination for various roles: Admin Role - system/important Lead Role - leader/leader Staff Role - staff/staff

See the db/seeds.rb file if you need more explanation

Note for the demo app - since I did not want to deal with the SSL issues on Heroku free account, I have commented out the ssl related code in the following files:

application_controller.rb user_sessions_controller.rb users_controller.rb

Caution!

The application has been extensively tested in Firefox only. Your milage will vary with other browsers, especially Internet Explorer!

License

Released under the MIT license. Not responsible for errors. Use at your own risk.

Contact Info

Bharat Ruparel bcruparel@yahoo.com

Something went wrong with that request. Please try again.