mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-26 11:14:23 +01:00
Beginning of a new component defined for normal users.
(ie. not for admin purposes)
This commit is contained in:
+1
-4
@@ -13,6 +13,7 @@ from mailng import admin
|
||||
from mailng.admin.models import Domain, Mailbox, Alias
|
||||
from forms import MailboxForm, DomainForm, AliasForm, PermissionForm
|
||||
from mailng.lib.authbackends import crypt_password
|
||||
from mailng.lib import _render
|
||||
|
||||
def _ctx_ok(url):
|
||||
return {"status" : "ok", "url" : url}
|
||||
@@ -20,10 +21,6 @@ def _ctx_ok(url):
|
||||
def _ctx_ko(tpl, ctx):
|
||||
return {"status" : "ko", "content" : render_to_string(tpl, ctx)}
|
||||
|
||||
def _render(request, tpl, user_context):
|
||||
return render_to_response(tpl, user_context,
|
||||
context_instance=RequestContext(request))
|
||||
|
||||
def is_superuser(user):
|
||||
if not user.is_superuser:
|
||||
user.message_set.create(message=_("Permission denied."))
|
||||
|
||||
Reference in New Issue
Block a user