예제 #1
0
 def wrap_action(self, action_, *args, **kwargs):
     if not wowo('auth'):
         reason = "Access to restricted areas has been disabled."
         if self.denial_handler:
             response.status = 403
             return self.denial_handler(reason)
         else:
             abort(403, comment=reason)
     else:
         return super(RestrictedWowoActionProtector, self).wrap_action(action_, *args, **kwargs)
예제 #2
0
 def wrap_action(self, action_, *args, **kwargs):
     if not wowo('auth'):
         return action_(*args, **kwargs)
     else:
         return super(WowoActionProtector, self).wrap_action(action_, *args, **kwargs)