Changeset - 4a5b93b3bcdd
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 14 years ago 2011-11-28 01:20:33
marcin@python-works.com
forbid notifications view for anonymous users
3 files changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/notifications.py
Show inline comments
 
@@ -8,7 +8,7 @@ from rhodecode.lib.base import BaseContr
 
from rhodecode.model.db import Notification
 

	
 
from rhodecode.model.notification import NotificationModel
 
from rhodecode.lib.auth import LoginRequired
 
from rhodecode.lib.auth import LoginRequired, NotAnonymous
 
from rhodecode.lib import helpers as h
 
from rhodecode.model.meta import Session
 

	
 
@@ -23,6 +23,7 @@ class NotificationsController(BaseContro
 
    #         path_prefix='/_admin', name_prefix='_admin_')
 

	
 
    @LoginRequired()
 
    @NotAnonymous()
 
    def __before__(self):
 
        super(NotificationsController, self).__before__()
 

	
rhodecode/public/css/style.css
Show inline comments
 
@@ -3526,7 +3526,9 @@ form.comment-inline-form {
 
    padding-top: 6px;
 
    float: left
 
}
 
 
.notification-list .container.unread{
 
	
 
}
 
.notification-header .desc.unread{
 
    font-weight: bold;
 
    font-size: 17px;
rhodecode/templates/admin/notifications/notifications.html
Show inline comments
 
@@ -29,8 +29,9 @@
 
    unread = lambda n:{False:'unread'}.get(n)
 
    %>
 
    <div class="table">
 
      <div class="notification-list">
 
      %for notification in c.notifications:
 
        <div id="notification_${notification.notification.notification_id}">
 
        <div id="notification_${notification.notification.notification_id}" class="container ${unread(notification.read)}">
 
          <div class="notification-header">
 
            <div class="gravatar">
 
                <img alt="gravatar" src="${h.gravatar_url(h.email(notification.notification.created_by_user.email),24)}"/>
 
@@ -45,6 +46,7 @@
 
          <div class="notification-subject">${h.literal(notification.notification.subject)}</div>
 
        </div>
 
      %endfor
 
      </div>
 
    </div>
 
    %else:
 
        <div class="table">${_('No notifications here yet')}</div>
0 comments (0 inline, 0 general)