Is this WPF or Silverlight?
I have not seen this behavior, can you provide a simple example illustrating the problem?
Sure.
<Label Grid.Row="0"
Grid.Column="0">Customer Name</Label>
<TextBox
Name="NameTextBox"
MinWidth="267"
MaxLength="40"
Text="{Binding Path=BusinessObject.Name, Mode=TwoWay, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}">
</TextBox>
<Controls:PropertyStatus Source="{Binding Path=BusinessObject}" Property="Name"
Target="{Binding ElementName=NameTextBox}" />
Add a auth rule
AllowRead(NameProperty, "Admin") and log in with a user who does not have the admin role.
The PropertyStatus calls the set_Text method on the text box, this triggers databinding to update the source. In my opinion you should only be calling set_Content not set_Text.
Let me know if you need any more info.
Ahh, I think I see.
It didn’t occur to me that someone would deny read to a
user, but allow them to write to the property.
So you have a scenario where the user isn’t allowed to
read, but is allowed to write?
Rocky
Rocky,
You are correct in that it is not a valid scenario for us to have a field that can be written but not read. However our security model is configurable through a Admin tool we build. So it is possible through configuration to create this scenario, (though it would probally be a mistake). In any case I just changed your code so it fits what we need.
Thanks,
Brette
Copyright (c) Marimer LLC