This file contains 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
javascript:(function() { | |
var possible = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
$('*:not(iframe)').contents().filter(function() { | |
return this.nodeType == Node.TEXT_NODE && this.nodeValue.trim() != ''; | |
}).each(function() { | |
var new_content = ''; | |
for(var i = 0; i<this.nodeValue.trim().length; i++) { | |
new_content += possible.charAt(Math.floor(Math.random() * possible.length)); | |
} | |
this.nodeValue = new_content; |
This file contains 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
<p>I've been working with <a href="http://www.endpoint.com/team/brian_gadoury">Phunk</a>, <a href="http://www.endpoint.com/team/brian_buchalter">Brian</a>, and <a href="http://www.endpoint.com/team/evan_tann">Evan</a> on a large Rails 3.1 project that has included several unique challenges. One of these challenges is a complex rights, roles, and accessibility system, which I'll discuss here.</p> | |
<p>Before I wrote any code, I researched existing authorization systems, and came across <a href="http://steffenbartsch.com/blog/2008/08/rails-authorization-plugins/">this article</a> which lists a few of the popular authorization gems in Rails. After reading through the documentation on several more advanced current authorization gems, I found that no gem offered the level of complexity we needed, where rights are layered on top of roles and can be mapped out to specific actions. Because the client and my team were most familiar with <a href="https://github.com/be9/acl9">acl9</a>, we chose to work with it and layer |
This file contains 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/ruby | |
#url labels can only be /a-zA-Z0-9-/ | |
urls = [ | |
['Spreedemo-home', 'http://demo.spreecommerce.com/'], | |
['Spreedemo-product', 'http://demo.spreecommerce.com/products/xm-inno-xm2go-portable-satellite-radio-mp3-player-and-home-kit'], | |
['Google-home', 'http://www.google.com/'], | |
['Google-shopping', 'http://www.google.com/prdhp?hl=en&tab=vf'] | |
] | |
n = 100 |