Re: D2W conditional rules based on actor
James Cicenia <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Ramsey - I am starting a brand new project and came across this thread. This looks great and could really jump start this project. What is the best way to start? Should I first fork the repository? Since I will probably need to make schema/model additions what is the best way to handle that while still getting git updates? Wondering, James Cicenia cell: 773.398.4649 On Oct 15, 2012, at 12:32 PM, Ramsey Gurley <[email protected]> wrote: > Hi Larry, > > Something like that should work. As mentioned, you can implement this as model logic with the guarded object interface. > > If this is truly control logic, you may run into areas where caching becomes a problem. I did. I decided the rule system was becoming a golden hammer in this case. > > My solution is a framework on github called ERAuth. > > https://github.com/nullterminated/ponder > > It handles authentication and authorization. Out of the box, it provides D2W crud authorization for EOs all the way down to the property level. You can add your own authorizations if needed. > > I've recently added a role based authorization scheme as well. You can set flags for each for your properties and EOs for each role and have them stored in the database. I don't have an example demonstrating role based auth yet, but it's just a lot of checkboxes. I'll probably add JS at some point to select all/none on a row or column. > > Since it depends on R2's usage of branch delegates to provide control buttons on every page, it basically requires ERR2D2W though. It also uses a new implementation of ERCoreBusinessLogic (ERCoreBL). I had to rewrite that to fix some things I didn't like about the original framework. > > If you're not ready for that leap, you're still welcome to look at it for inspiration and use whatever parts you might find handy :-) > > Ramsey > > On Oct 13, 2012, at 8:42 AM, Fabian Peters wrote: > >> 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 >> _______________________________________________ >> 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 > _______________________________________________ > Wonder-disc mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wonder-disc ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Wonder-disc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wonder-disc