Skip to content

Instantly share code, notes, and snippets.

@pbanaszkiewicz
Created March 18, 2014 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbanaszkiewicz/9629610 to your computer and use it in GitHub Desktop.
Save pbanaszkiewicz/9629610 to your computer and use it in GitHub Desktop.
class Job(object):
@require_perms("create_vm")
@staticmethod
def create_vm(**data):
pass
# ... somewhere else ...
with permissions(current_user.perms):
job = Job.create_vm()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment