LayoutImageMgr.checkAdd (usr, level)
check if user is allowed to add pictures (overwrites ImageMgr.checkAdd())

  • Parameter Obj:
    Userobject
  • Parameter Int:
    Permission-Level
  • Returns
    String Reason for denial (or null if allowed)
  • See also
    ImageMgr/securityFunctions.js
Sourcecode in LayoutImageMgr/securityFunctions.js:
1:   function checkAdd(usr, level) {
2:      if (this._parent.site) {
3:         if ((level & MAY_EDIT_LAYOUTS) == 0)
4:            throw new DenyException("layoutEdit");
5:      } else if (!usr.sysadmin)
6:         throw new DenyException("imageAdd");
7:      return;
8:   }