[Mpuls-commits] r1427 - wasko/branches/2.0/waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 9 17:56:23 CET 2010


Author: torsten
Date: 2010-02-09 17:56:22 +0100 (Tue, 09 Feb 2010)
New Revision: 1427

Modified:
   wasko/branches/2.0/waskaweb/controllers/administration.py
Log:
* waskaweb/controllers/administration.py (createUserAction): Deleted.
Is now implemented in mpulsweb


Modified: wasko/branches/2.0/waskaweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/administration.py	2010-02-09 16:54:34 UTC (rev 1426)
+++ wasko/branches/2.0/waskaweb/controllers/administration.py	2010-02-09 16:56:22 UTC (rev 1427)
@@ -148,42 +148,6 @@
             #return "Es ist ein Fehler beim Speichern des Benutzers aufgetreten."
 
     @checkRole('admin_ka')
-    def createUserAction(self):
-        validator = NewUserForm()
-        c.user_password = None
-        try:
-            try:
-                agency = getDbName()
-                state = ValidatorStateObject
-                state.agency = agency
-                c.form_result = validator.to_python(request.params, state)
-                c.uo = UserObject()
-                # Set initial data which is needed to create a new user
-                login = c.form_result.get('login', '')
-                role = c.form_result.get('role', '')
-                c.uo.setData(c.form_result)
-                # create user
-                c.user_password = c.uo.createLogin(login, role, agency)
-                return render('/administration/new_user_result.mako')
-            except formencode.Invalid, error:
-                c.form_result = error.value
-                c.form_errors = error.error_dict or {}
-                form = render('/administration/new_user.mako')
-                return htmlfill.render(unicode(form, 'utf-8'),
-                                       c.form_result, c.form_errors,
-                                       auto_insert_errors=False)
-            except:
-                c.failed_for = NEW_USER_FAILURE_HEADER
-                c.failed_text = NEW_USER_FAILURE_TEXT
-                return render('/tests/trace.mako')
-                c.url_ok = "/administration/overviewUser"
-                return render('/administration/dialogs/failed_new_user.mako')
-
-        except:
-            return render('/tests/trace.mako')
-            #return "Es ist ein Fehler beim Speichern des Benutzers aufgetreten."
-
-    @checkRole('admin_ka')
     def deleteUser(self, id, confirmed='0'):
         id = self._checkInt(id)
         confirmed = self._checkBool(confirmed)



More information about the Mpuls-commits mailing list