Deletions are marked like this. | Additions are marked like this. |
Line 15: | Line 15: |
1. ''Ruby on Rails 3 Tutorial'', by Michael Hartl - A beginning book with an emphasis on automated unit and integration testing with '''RSpec''' 1. ''The Rails 3 Way'', by David H. Hansson - An advanced book with in-depth descriptions of most Rails related topics |
1. '''''Ruby on Rails 3 Tutorial''''', by Michael Hartl - A beginning book with an emphasis on automated unit and integration testing with '''RSpec''' 1. '''''The Rails 3 Way''''', by David H. Hansson - An advanced book with in-depth descriptions of most Rails related topics |
Line 23: | Line 23: |
1. '''Rails API''' documentation - http://api.rubyonrails.org 1. '''Rails Guides''' - http://guides.rubyonrails.org = Application Services = |
|
Line 26: | Line 31: |
1. See '''Log4R''' |
1. Use '''Log4R''' * See: https://github.com/colbygk/log4r * Documentation: http://log4r.rubyforge.org |
Line 30: | Line 37: |
== Authorization and Authentication == |
1. Use '''rails_config''' * See: https://github.com/railsjedi/rails_config 1. For more about Rails application configuration: * http://guides.rubyonrails.org/configuring.html |
Line 32: | Line 42: |
1. We should probably use the ''most popular'' user authorization Ruby GEM 1. Fallback is to use the method described in the example application described in the ''Hartl'' book |
== Authentication == 1. Use '''Devise''' - Currently the most popular Authentication module * See https://github.com/plataformatec/devise 1. Consider the following supporting modules: 1. '''Can``Can''' - Intrgrates with Devise and provides useful authentication functions that can be used in .erb templates * See: https://github.com/ryanb/cancan * See: http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers 1. '''Omni``Auth''' - Which probably supports logins via Google+, Facebook, etc. * See: https://github.com/intridea/omniauth 1. General discussion of Rails recurity * See: http://guides.rubyonrails.org/security.html == Internationalization == 1. Use'''I18n''' * See: http://guides.rubyonrails.org/i18n.html * See section 11.20 in ''Hansson'' book |
Line 42: | Line 68: |
== Internationalization == 1. Use the '''I18n''' Ruby GEM. See section 11.20 in ''Hansson'' book |
V2 High Level Design Notes
Introduction
This section contains notes for the design and implementation of V2, in particular notes about how to use the technology stack.
Ruby On Rails
Resources
Books
Ruby on Rails 3 Tutorial, by Michael Hartl - A beginning book with an emphasis on automated unit and integration testing with RSpec
The Rails 3 Way, by David H. Hansson - An advanced book with in-depth descriptions of most Rails related topics
Section 11.20 - Internationalization using the I18n Ruby GEM
- Chapter 14 - Authentication
- Chapter 18 - RSpec
On-Line Reference Material
Rails API documentation - http://api.rubyonrails.org
Rails Guides - http://guides.rubyonrails.org
Application Services
Logging
Use Log4R
Documentation: http://log4r.rubyforge.org
Application Configuration
Use rails_config
- For more about Rails application configuration:
Authentication
Use Devise - Currently the most popular Authentication module
- Consider the following supporting modules:
CanCan - Intrgrates with Devise and provides useful authentication functions that can be used in .erb templates
OmniAuth - Which probably supports logins via Google+, Facebook, etc.
- General discussion of Rails recurity
Internationalization
UseI18n
See section 11.20 in Hansson book
Background Process (Event Daemon)
- See Chapter 20 in Hansson book. Suggested alternatives:
- Delayed Job
- Resque
- Rails Runner
PDF File Generation
User Access Modeling
Definitions
Library - an entity that contains multiple Projects
- A Library is the repository that manages user login, e.g. it authenticates users, typically via user login name and password (or LDAP, etc.)
- Contains a catalog of user names, login names and authorization information, e.g. encrypted passwords or links to LDAP or other authentication external authentication systems
- A Library does not contain user role information for individual projects
- Except that it is able to provide a list of links that jump to the home pages of the projects (in the library) that the user has access to
- If a user doesn't have any roles for a particular project, then they do not even see that the project exists
- This might be managed by a configuration variable, to allow implementation of a compeny-based systems which let all users see the names of all projects
- A Library is the repository that manages user login, e.g. it authenticates users, typically via user login name and password (or LDAP, etc.)
Project - an entity that contains user data, e.g. documents, revisions, tasks, etc.
- Each project must belong to exactly one library
- A project contains:
- Project metadata, stored in the project's database
- Including user access rights for all the project's users
- A set of files (revision files, correspondence files, ZIP files, etc.) stored in a directory tree
- The metadata database and files of a project are never mixed between projects. This is to:
- Ensure customer data privacy
- Make it possible to make individual project backups
- Project metadata, stored in the project's database
Requirements
- A user has the same login credentials for all projects, he has access to, within a single library
- A library dictates the user authentication policy, e.g. how user logins are validated, for all the projects that belong to it
- A library has a landing page
- The landing page is the user login page for the all projects that belong to it
- A library has administrative transactions for defining and managing users
There are library users that have library administrator roles
- The library configuration sets the login security policy, e.g. password length, frequency of password changes, etc.
- Initially this will be via configuration variables
- Later this might be managed by online transactions available to the library administrators
- Integrity of project metadata:
- All metadata for a project is stored in a single database
- Databases never contain metadata from multiple projects
- Projects can be migrated between libraries
- This will initially be done using a manual procedure, e.g. shell and SQL scripts
- Later this could be automated
- User roles for individual projects are managed within the projects
There are users that have project administrator roles within projects
- A project administrator manages user roles for a project
- The project administrator role is limited the project it is associated with
- A user might have project administrator rights in multiple projects
User roles for library and project administration do not include the ability to grant the roles to others, which are controlled by seperate grant library administrator and grant project administrator roles