Hi,
I try to hide some panel.name form not admin users like this
({ extendsFrom: 'CreateView',
initialize: function (options) {
app.view.invokeParent(this, {type: 'view', name: 'create', method: 'initialize', args:[options]});
var isAdmin = app.user.get('type') == 'admin';
if (!isAdmin) {
this.meta.panels = _.filter(this.meta.panels, function (panel) {
if (!(panel.name == "pane-recycle-styler" || panel.name == "panel_hidden_recycles" || panel.name == "panel_hidden_recycle_assign" || panel.name == "panel_hidden_activity")) return true;
return false;
})
}
},
})
but I have more issue, Please HELP!
I try to put this into record.js in custom/modules/Contacts/clients/base/views/record/record.js
may be need another file?