summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-gui/ipagui/controllers.py
diff options
context:
space:
mode:
authorKevin McCarthy <kmccarth@redhat.com>2007-09-20 14:53:23 -0700
committerKevin McCarthy <kmccarth@redhat.com>2007-09-20 14:53:23 -0700
commit5cdfc5bd3b63bd20071b75e3e70ebbc491d51589 (patch)
tree2de2dd834ef0232cd658617cd1c9bb0d13733025 /ipa-server/ipa-gui/ipagui/controllers.py
parent370500ab1a1a3c3fe2d3a09f61186d9787c406f2 (diff)
downloadfreeipa-5cdfc5bd3b63bd20071b75e3e70ebbc491d51589.tar.gz
freeipa-5cdfc5bd3b63bd20071b75e3e70ebbc491d51589.tar.xz
freeipa-5cdfc5bd3b63bd20071b75e3e70ebbc491d51589.zip
Add set_krbccache() calls to new controller methods.
Small fix to proxyprovider for anonymous case.
Diffstat (limited to 'ipa-server/ipa-gui/ipagui/controllers.py')
-rw-r--r--ipa-server/ipa-gui/ipagui/controllers.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ipa-server/ipa-gui/ipagui/controllers.py b/ipa-server/ipa-gui/ipagui/controllers.py
index c16f04c63..75e448352 100644
--- a/ipa-server/ipa-gui/ipagui/controllers.py
+++ b/ipa-server/ipa-gui/ipagui/controllers.py
@@ -228,7 +228,7 @@ class Root(controllers.RootController):
def userlist_ajax(self, **kw):
"""Searches for users and displays list of results in a table.
This method is used for ajax calls."""
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
users = []
searchlimit = 100
uid = kw.get('uid')
@@ -332,7 +332,7 @@ class Root(controllers.RootController):
if (len(givenname) == 0) or (len(sn) == 0):
return ""
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
givenname = givenname.lower()
sn = sn.lower()
@@ -384,7 +384,7 @@ class Root(controllers.RootController):
if tg_errors:
turbogears.flash("There was a problem with the form!")
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
return dict(form=group_new_form)
@@ -393,7 +393,7 @@ class Root(controllers.RootController):
def groupcreate(self, **kw):
"""Creates a new group"""
restrict_post()
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
if kw.get('submit') == 'Cancel':
turbogears.flash("Add group cancelled")
@@ -427,7 +427,7 @@ class Root(controllers.RootController):
if tg_errors:
turbogears.flash("There was a problem with the form!")
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
try:
group = client.get_group_by_cn(cn, group_fields)
@@ -470,7 +470,7 @@ class Root(controllers.RootController):
def groupupdate(self, **kw):
"""Updates an existing group"""
restrict_post()
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
if kw.get('submit') == 'Cancel Edit':
turbogears.flash("Edit group cancelled")
raise turbogears.redirect('/groupshow', cn=kw.get('cn'))
@@ -573,7 +573,7 @@ class Root(controllers.RootController):
@identity.require(identity.not_anonymous())
def grouplist(self, **kw):
"""Search for groups and display results"""
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
groups = None
# counter = 0
criteria = kw.get('criteria')
@@ -595,7 +595,7 @@ class Root(controllers.RootController):
@identity.require(identity.not_anonymous())
def groupshow(self, cn):
"""Retrieve a single group for display"""
- client.set_principal(identity.current.user_name)
+ client.set_krbccache(os.environ["KRB5CCNAME"])
try:
group = client.get_group_by_cn(cn, group_fields)
group_dict = group.toDict()