Hi,
Is there any way to extend the permission verification in MODExt (understand being able to check more permissions than the ones already provided :
http://rtfm.modx.com/display/revolution20/MODExt+MODx+Object#MODExtMODxObject-MODx.perm )?
Since there are numerous ways of doing things in/with MODX, i might have chosen an "improper" one. Basically, here’s what i’m trying to achieve:
In a CMP grid, i’d like to check if a user have some permission (in my case edit_locked). If so, some options will be available in the contextual menu. Some code might be more "talkative":
…
,getMenu: function() {
var m = [];
if (this.menu.record.locked != 1 || MODx.perm.new_chunk == 1 ) {
m.push({
text: _('asides.aside_update')
,handler: this.updateAside
});
m.push('-');
m.push({
text: _('asides.aside_remove')
,handler: this.removeAside
});
}
this.addContextMenuItem(m);
}
…
So if you have any idea on how i could do (either via "extending" MODx.perm or via another way), any reading recommendation would be welcome (/me loves reading MODX source code
).
Thanks