mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
* Fixed forwards definition
* Cleanup * Do not check for release requests if the user is a simple user (see #227) see #204
This commit is contained in:
@@ -97,7 +97,11 @@ def remove_user_record(mailbox):
|
||||
Users.objects.get(email=mailbox.full_address).delete()
|
||||
|
||||
@events.observe("GetStaticContent")
|
||||
def extra_static_content():
|
||||
def extra_static_content(user):
|
||||
if parameters.get_admin("USER_CAN_RELEASE") == "yes" \
|
||||
or user.group == "SimpleUsers":
|
||||
return []
|
||||
|
||||
tpl = Template("""<script type="text/javascript">
|
||||
function check_nb_requests() {
|
||||
$.ajax({
|
||||
|
||||
@@ -115,7 +115,10 @@ def onModifyMailbox(mailbox, oldmailbox):
|
||||
alias.save()
|
||||
|
||||
@events.observe("GetStaticContent")
|
||||
def get_static_content():
|
||||
def get_static_content(user):
|
||||
if not user.has_mailbox:
|
||||
return []
|
||||
|
||||
return """<script type="text/javascript">
|
||||
function arform_cb() {
|
||||
$('#id_untildate').datepicker({format: 'yyyy-mm-dd'});
|
||||
|
||||
@@ -35,6 +35,7 @@ def index(request, tplname="sievefilters/index.html"):
|
||||
else:
|
||||
default_script = "%s/" % active_script
|
||||
return _render(request, tplname, {
|
||||
"selection" : "user",
|
||||
"active_script" : active_script,
|
||||
"default_script" : default_script,
|
||||
"scripts" : sorted(scripts),
|
||||
|
||||
Reference in New Issue
Block a user