summaryrefslogtreecommitdiffstats
path: root/idp/extra/modules/identities_ui.ptl
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@0d.be>2008-09-08 08:56:15 (GMT)
committerFrederic Peters <fpeters@0d.be>2008-09-08 08:56:15 (GMT)
commitb6c989771f034cd00296e391ba5d0d30525b4a01 (patch)
treeb0bcb47b76c194cb4d97ca44400f9bc669f84b19 /idp/extra/modules/identities_ui.ptl
parent8340239c83be599d41e730398ebe0e70821f1fda (diff)
downloadpratic-b6c989771f034cd00296e391ba5d0d30525b4a01.zip
pratic-b6c989771f034cd00296e391ba5d0d30525b4a01.tar.gz
pratic-b6c989771f034cd00296e391ba5d0d30525b4a01.tar.bz2
don't allow local admins to create accounts
Diffstat (limited to 'idp/extra/modules/identities_ui.ptl')
-rw-r--r--idp/extra/modules/identities_ui.ptl6
1 files changed, 5 insertions, 1 deletions
diff --git a/idp/extra/modules/identities_ui.ptl b/idp/extra/modules/identities_ui.ptl
index 7fc8132..ce7efe1 100644
--- a/idp/extra/modules/identities_ui.ptl
+++ b/idp/extra/modules/identities_ui.ptl
@@ -233,7 +233,7 @@ class IdentitiesDirectory(Directory):
self.collectivity.ou, _('Services Management'))
else:
'<a href="../services/">%s</a> - ' % _('Services Management')
- if user.is_admin() or user.is_local_admin():
+ if user.is_admin():
'<a href="new">%s</a> - ' % _('Add a new Agent')
'<a href="csv">%s</a> - ' % _('Import CSV File')
if (user.is_admin() or user.is_local_admin()) and (self.collectivity.ou != 'admin'):
@@ -457,6 +457,8 @@ class IdentitiesDirectory(Directory):
def new [html] (self):
+ if not user.is_admin():
+ raise errors.AccessForbiddenError()
form = Form(enctype='multipart/form-data')
form.add(StringWidget, 'uid', title = _('Pr@tic Username'), required = True, size = 30)
form.add(StringWidget, 'cdg59agentSirhCode', title = _('SIRH Code'), required = True,
@@ -527,6 +529,8 @@ class IdentitiesDirectory(Directory):
return directory.get_agent(self.collectivity, form.get_widget('uid').parse())
def csv [html] (self):
+ if not user.is_admin():
+ raise errors.AccessForbiddenError()
form = Form(enctype='multipart/form-data')
form.add(FileWidget, 'csv', title = _('CSV File'), required = True)
form.add_submit('submit', _('Submit'))