ImageMgr.checkAdd (usr, level)
check if user is allowed to add images

  • Parameter Obj:
    Userobject
  • Parameter Int:
    Permission-Level
  • Returns
    String Reason for denial (or null if allowed)
Sourcecode in ImageMgr/securityFunctions.js:
1:   function checkAdd(usr, level) {
2:      if (!this._parent.preferences.getProperty("usercontrib") && (level & MAY_ADD_IMAGE) == 0)
3:         throw new DenyException("imageAdd");
4:      return;
5:   }