Site.checkView (usr, level)
check if a user is allowed to view a site

  • Parameter Obj:
    Userobject
  • Parameter Int:
    Permission-Level
Sourcecode in Site/securityFunctions.js:
1:   function checkView(usr, level) {
2:      if (!this.online) {
3:         // if not logged in or not logged in with sufficient permissions
4:         if (!usr || (level < CONTRIBUTOR && !usr.sysadmin))
5:            throw new DenyException("siteView");
6:      }
7:      return;
8:   }