summaryrefslogtreecommitdiffstats
path: root/.emacs.d/snippets/python-mode/permission_guard
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/snippets/python-mode/permission_guard')
-rw-r--r--.emacs.d/snippets/python-mode/permission_guard9
1 files changed, 0 insertions, 9 deletions
diff --git a/.emacs.d/snippets/python-mode/permission_guard b/.emacs.d/snippets/python-mode/permission_guard
deleted file mode 100644
index ab53895..0000000
--- a/.emacs.d/snippets/python-mode/permission_guard
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- mode: snippet -*-
-# name: Permission guard
-# key: defm
-# --
-@method_decorator(permission_required('$1',
- raise_exception=True))
-def dispatch(self, *args, **kwargs):
- '''Make sure the user has the $1 permission.'''
- return super(${3:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).dispatch(*args, **kwargs) \ No newline at end of file