app/soc/views/helper/access.py
changeset 727 ddf44af087a0
parent 726 ba3d399ec9be
child 729 7fe218e3d359
equal deleted inserted replaced
726:ba3d399ec9be 727:ddf44af087a0
   356       'scope_path': user_link_id,
   356       'scope_path': user_link_id,
   357       }
   357       }
   358   
   358   
   359   notification = notification_logic.logic.getForFields(properties, unique=True)
   359   notification = notification_logic.logic.getForFields(properties, unique=True)
   360   
   360   
   361   user = user_logic.logic.getForFields(
   361   user = user_logic.logic.getForCurrentAccount()
   362       {'account': users.get_current_user()}, unique=True)
       
   363   
   362   
   364   # check if the key of the current user matches the key from the scope of the message
   363   # check if the key of the current user matches the key from the scope of the message
   365   if user.key() == notification.scope.key():
   364   if user.key() == notification.scope.key():
   366     # access granted
   365     # access granted
   367     return None
   366     return None