I was referring to Tim’s second attempt, though your rule works as well.

On May 13, 2015, at 4:44 PM, Theodore Petrosky <[email protected]> wrote:

> I'm sorry Ramsey, you say the second attempt is good! I'm lost, which is the 
> second attempt?
> 
> Sent from my iPad
> 
> On May 13, 2015, at 4:56 PM, Ramsey Gurley <[email protected]> wrote:
> 
>> The boolean assignment expects a boolean value. A key path is not a boolean 
>> value :) If it did somehow work, it still wouldn’t work because the first 
>> time you fired the rule, it would cache the value, and that would be the 
>> value forever. 
>> 
>> Your second attempt is the proper approach, because it will cache and fire 
>> correctly based on the keys in the lhs.
>> 
>> On May 13, 2015, at 1:18 PM, Timothy Worman <[email protected]> wrote:
>> 
>>> Nice. Thanks. I’m always solving problems right after I ask a question, 
>>> so………..I also tried this and it works.
>>> 
>>> 110 : ((entity.name = 'Role' and task != 'editRelationship') and 
>>> session.loggedInMember.canEditRolesInAdminApp = 1) => isEntityEditable = 
>>> "true" [com.webobjects.directtoweb.BooleanAssignment]
>>> 
>>> I don’t like either of the ones that work as much as the original one that 
>>> doesn’t!!
>>> 
>>> Tim Worman
>>> UCLA GSE&IS
>>> 
>>> 
>>>> On May 13, 2015, at 1:15 PM, Theodore Petrosky <[email protected]> wrote:
>>>> 
>>>> this one works for me:
>>>> 
>>>> 100 : entity.name = 'AdRelease' => isEntityEditable = {"conditionKey" = 
>>>> "session.user.security.canEditAdRelease"; "trueValue" = "true"; } 
>>>> [er.directtoweb.assignments.delayed.ERDDelayedBooleanAssignment]
>>>> 
>>>> 
>>>> 
>>>> On May 13, 2015, at 4:12 PM, Timothy Worman <[email protected]> wrote:
>>>> 
>>>>> My D2W kung fu is not the strongest and I’m in need of some D2W guru 
>>>>> love. I have an entity that I only want to be editable for certain users. 
>>>>> So, I have this in my rule file:
>>>>> 
>>>>> 110 : (entity.name = ‘Role' and task != 'editRelationship') => 
>>>>> isEntityEditable = "session.loggedInMember.canEditRolesInAdminApp" 
>>>>> [com.webobjects.directtoweb.BooleanAssignment]
>>>>> 
>>>>> The only problem is that now edit buttons are never presented regardless 
>>>>> of who the user is. If I simply use “true” on the RHS it works fine. Is 
>>>>> the issue that I cannot reference the session from the RHS of a rule?
>>>>> 
>>>>> Tim Worman
>>>>> UCLA GSE&IS
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list      ([email protected])
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> https://lists.apple.com/mailman/options/webobjects-dev/tedpet5%40yahoo.com
>>>>> 
>>>>> This email sent to [email protected]
>>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>> 
>>> This email sent to [email protected]
>> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to