do not allow users to manually specify their notification email address, construct it from their username and the "EmailDomain" option
This commit is contained in:
parent
6566f35deb
commit
9ed2f9f5e7
5 changed files with 20 additions and 25 deletions
|
|
@ -154,13 +154,12 @@
|
|||
<div class="dataHeader" id="notificationlist">Your Notifications</div>
|
||||
<table class="data-list">
|
||||
<tr>
|
||||
<td colspan="6"></td>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
<tr class="list-header">
|
||||
<th>Package</th>
|
||||
<th>Tag</th>
|
||||
<th>Type</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
@ -169,14 +168,13 @@
|
|||
<td>#if $notif.package then $notif.package.name else 'all'#</td>
|
||||
<td>#if $notif.tag then $notif.tag.name else 'all'#</td>
|
||||
<td>#if $notif.success_only then 'success only' else 'all'#</td>
|
||||
<td>$notif.email</td>
|
||||
<td><a href="notificationedit?notificationID=$notif.id">edit</a></td>
|
||||
<td><a href="notificationdelete?notificationID=$notif.id">delete</a></td>
|
||||
</tr>
|
||||
#end for
|
||||
#if $len($notifs) == 0
|
||||
<tr class="row-odd">
|
||||
<td colspan="3">No notifications</td>
|
||||
<td colspan="5">No notifications</td>
|
||||
</tr>
|
||||
#end if
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -229,12 +229,8 @@ def notificationedit(req, notificationID):
|
|||
success_only = True
|
||||
else:
|
||||
success_only = False
|
||||
|
||||
email = form['email'].value
|
||||
if not email:
|
||||
raise koji.GenericError, 'an email address for the notification must be provided'
|
||||
|
||||
server.updateNotification(notification['id'], package_id, tag_id, success_only, email)
|
||||
server.updateNotification(notification['id'], package_id, tag_id, success_only)
|
||||
|
||||
mod_python.util.redirect(req, 'index')
|
||||
elif form.has_key('cancel'):
|
||||
|
|
@ -278,12 +274,8 @@ def notificationcreate(req):
|
|||
success_only = True
|
||||
else:
|
||||
success_only = False
|
||||
|
||||
email = form['email'].value
|
||||
if not email:
|
||||
raise koji.GenericError, 'an email address for the notification must be provided'
|
||||
|
||||
server.createNotification(user['id'], package_id, tag_id, success_only, email)
|
||||
server.createNotification(user['id'], package_id, tag_id, success_only)
|
||||
|
||||
mod_python.util.redirect(req, 'index')
|
||||
elif form.has_key('cancel'):
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@
|
|||
<th>Success Only?</th>
|
||||
<td><input type="checkbox" name="success_only" value="yes"#if $notif and $notif.success_only then ' checked' else ''#>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td><input type="text" name="email" value="#if $notif then $notif.email else ''#"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
#if $notif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue