Skip to content

Instantly share code, notes, and snippets.

View scj7t4's full-sized avatar

Stephen Jackson scj7t4

  • Albuquerque, NM
View GitHub Profile
@scj7t4
scj7t4 / options.py
Created June 15, 2012 15:28 — forked from mnuck/options.py
Three ways to do the same thing (now Four!)
# option 1
if request.POST['modify'] == 'public':
assign_perm('modify', anon, rs)
else:
remove_perm('modify', anon, rs)
if request.POST['view'] == 'public':
assign_perm('view', anon, rs)
else:
remove_perm('view', anon, rs)
if request.POST['execute'] == 'public':