Skip to content

Instantly share code, notes, and snippets.

@seancoyne
Last active August 29, 2015 14:07
Show Gist options
  • Save seancoyne/805a7b4de907cadc5c1c to your computer and use it in GitHub Desktop.
Save seancoyne/805a7b4de907cadc5c1c to your computer and use it in GitHub Desktop.
fix rule permission
<cfscript>
st = {
permissionid = 'E689D5A2-CE66-DAE1-54DCAC81F0E215B1', // genericEdit
roleid = 'B0602740-02C2-11E4-81BE005056890043', // content - SmartER [publisher]
referenceid = '70F5FB30-02C1-11E4-81BE005056890043', // objectid of the record in farCoapi for ruleSmarterPatientAppointment
objecttype = 'farCoapi', // this is a farCoapi permission (it pertains to a custom type)
barnaclevalue = 1 // 1 means "grant" this permission (-1 is deny, 0 is inherit)
};
// save the record
o = application.fapi.getContentType('farBarnacle');
st = o.beforesave(st, {});
result = o.createData(st);
st = o.getdata(result.objectid);
o.afterSave(st);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment