summaryrefslogtreecommitdiffstats
path: root/cobbler/modules/authz_allowall.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-02-15 14:54:25 -0500
committerMichael DeHaan <mdehaan@redhat.com>2008-02-15 14:54:25 -0500
commita47ee22ab684eed992128b60b136fca90ff9f119 (patch)
treecd55daf8057049368b4aaa6d23c30408eae411d2 /cobbler/modules/authz_allowall.py
parent70bfc8f5a3150d09cc064a4c46efcaff80b29904 (diff)
parenta7d67f35019af0c25f133c979112fc6035d7e04c (diff)
downloadthird_party-cobbler-a47ee22ab684eed992128b60b136fca90ff9f119.tar.gz
third_party-cobbler-a47ee22ab684eed992128b60b136fca90ff9f119.tar.xz
third_party-cobbler-a47ee22ab684eed992128b60b136fca90ff9f119.zip
Merge branch 'devel'
Merging devel work on 0.7.X/0.8 release with master Conflicts: CHANGELOG cobbler.spec cobbler/action_import.py cobbler/utils.py cobbler/webui/master.py setup.py
Diffstat (limited to 'cobbler/modules/authz_allowall.py')
-rw-r--r--cobbler/modules/authz_allowall.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/cobbler/modules/authz_allowall.py b/cobbler/modules/authz_allowall.py
new file mode 100644
index 0000000..1b05630
--- /dev/null
+++ b/cobbler/modules/authz_allowall.py
@@ -0,0 +1,41 @@
+"""
+Authorization module that allows everything, which is the default
+for new cobbler installs.
+
+Copyright 2007, Red Hat, Inc
+Michael DeHaan <mdehaan@redhat.com>
+
+This software may be freely redistributed under the terms of the GNU
+general public license.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""
+
+import distutils.sysconfig
+import ConfigParser
+import sys
+from rhpl.translate import _, N_, textdomain, utf8
+
+plib = distutils.sysconfig.get_python_lib()
+mod_path="%s/cobbler" % plib
+sys.path.insert(0, mod_path)
+
+import cexceptions
+import utils
+
+
+def register():
+ """
+ The mandatory cobbler module registration hook.
+ """
+ return "authz"
+
+def authorize(api_handle,user,resource,arg1=None,arg2=None):
+ """
+ Validate a user against a resource.
+ """
+ return True
+
+