Site.checkUnsubscribe (usr, level)
check if user is allowed to unsubscribe

  • Parameter Obj:
    Userobject
  • Returns
    String Reason for denial (or null if allowed)
Sourcecode in Site/securityFunctions.js:
1:   function checkUnsubscribe(usr, level) {
2:      if (level == null)
3:         throw new Exception("subscriptionNoExist");
4:      else if (level == ADMIN) {
5:         // Admins are not allowed to remove a subscription
6:         throw new DenyException("unsubscribe");
7:      }
8:      return;
9:   }