LayoutImageMgr.checkAdd (usr, level) |
check if user is allowed to add pictures
(overwrites ImageMgr.checkAdd())
|
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: } |