DataObjects/Core_notify_recur.php
[Pman.Core] / Pman.Dialog.PersonEditor.js
index 9f714b2..b1413e3 100644 (file)
@@ -172,10 +172,16 @@ Pman.Dialog.PersonEditor.prototype = {
         this.loadItemTypes();
         Roo.each(this.itemList, function(il) {
             if (typeof(il) != 'object') {
+                // no permission for Core offices.. - can not show department...
+                if (il == 'office_id_name' && !Pman.hasPerm('Core.Offices','S')) {
+                    return true;
+                }
+                
                 _this.form.addxtype(_this.itemTypes[il]);
                 return true;
             }
             _this.form.addxtype(Roo.apply(il, _this.itemTypes[il.name]));
+            return true;
             
         });
         var ef = this.dialog.getLayout().getEl().createChild({tag: 'div'});