Re: D2W conditional rules based on actor
Fabian Peters <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Hi Larry, This is possible, yes. You may also want to look at the methods in ERXGuardedObjectInterface. If you use a custom superclass for all your EOs, you can easily define default behaviours via these methods. Fabian Am 13.10.2012 um 17:13 schrieb Larry Mills-Gahl: > I am wondering if there is a way to provide a value to a rule that is based on a changing value in the session (or will rule cacheing make this a bad place for this type of choice) > > I would like to set "isEntityEditable" (and potentially other similar rule choices) based on a session value that reflects the permission structure I already have in place. So, instead of setting the rule for an entity to "true" or "false", Little Paranoid Larry wants to set: > 40 : *true* => isEntityDeletable = "false" [com.webobjects.directtoweb.BooleanAssignment] > > and then set something like > > 100: entity.name = "MyEntity" = "session.getActor.canEditMyEntity" [er.directtoweb.assignments.delayed.ERDDelayedBooleanAssignment] > > > Is that possible? I don't have it working yet and I'm wondering if I'm on a path that will lead nowhere or if I'm just not worthy yet of the depths of D2W... > > > Larry > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________ > Wonder-disc mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wonder-disc ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev