- Overall permissions and assignments will be stored in PostgreSQL
- A simplified cached version of a users' permissions will be stored in Redis
- Contains a hash with the permission name and class and id of the object if relevant
- Authorization will reference the cached version in Redis using Ohm
- The cache will be build if there is no data in it when Rails starts
- Changes to permissions or permissions assignments will trigger a cache update job(in Resque)
- Users will have a default Role assigned which will contain permissions everyone who is logged in has
- AnonymousUsers will have a default Role assigned which will contain permissions logged out users have
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http_basic_authenticate_with name: "cmaxw", password: "railsclips" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json.name task.name | |
json.due_at task.due_at.strftime("%Y-%m-%d") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'httparty' | |
require 'feedjira' | |
def get_feed(source) | |
if source.start_with?("http") | |
xml = feed_from_url(source) | |
else | |
xml = feed_from_file(source) |
OlderNewer