Setting Default Permissions

Recently, a colleague and I wanted to make the default card permission grant read access to authenticated users. Instead of looking up permissions, we spent some interesting time in the code, writing tests, etc.

 

We created a script which you can run from script/console to automatically change the default card read permission. Idiomatic wagn would have been:

 

/*Card.find_by_name("Basic+*tform").permit(:read, Role[:auth])*/

 

Here's our actual script on gist.

 

 

 

try it

 

wagneers

intro

videos

features

syntax

weekly calls

ideas

 

twitter

mailing list

 

developers

roadmap

next release

tickets

pack API

REST API

one-pager

 

github

mailing list

 

wagn.org

recent

todo