By Scott - 10/30/2006
The documentation says that the event has an actionrequested, allowed and a businessobject for the checksecurityeventargs. All I see is permissioninfo and permissionkey, am I looking at the incorrect event?Scott
|
By Scott - 10/31/2006
Scott (10/30/2006)
The documentation says that the event has an actionrequested, allowed and a businessobject for the checksecurityeventargs. All I see is permissioninfo and permissionkey, am I looking at the incorrect event? Scott Scott
|
By Trent L. Taylor - 10/31/2006
This event has changed with the advent of the Role-Based Security. If you are looking in the StrataFrame Help documentation, we need to update this...sorry Everything is now Permission based ... if you look in the Security Help you should find your updated event docs.
|
By Scott - 10/31/2006
We didn't purchase the security module. Will I still be able to implement a similiar type of security thru the checksecurityevent with out purchasing the security module?Basically all I want to do is be able to determine if a record should be allowed to be edited. If the printed property is true then I do not want to all the user to edit this record. Similar situations if a record is older then 7 days. Any guidence would be appreciated. Thanks Scott
|
By StrataFrame Team - 10/31/2006
Yes, all of the security hooks are still throughout the framework. In fact, the security module just plugs the security into the application through those hooks. So, yes, all you have to do is handle the CheckSecurity event to determine whether a record can be edited and the CheckFieldSecurity event to determine whether specific fields can be edited.Also, if you want to implement your own system for determining permissions and/or roles, then you can create an object that implements the ISecurityUser interface and you can place that object in the SecurityBasics.CurrentUser property to take advantage of even more of the security hooks through the GetPermission() method of the ISecurityUser interface. The framework will query that object whenever it needs to check security and you can return the appropriate value.
|
By Scott - 10/31/2006
Thanks.On an off note have you every seen the text in richtextboxes start typing in reverse? "This" would type like "sihT" and the cursor doesn't move from the left margin. Every time I hit the space key it take me to the start of the line. This is also happening for text boxes. I know I did something wrong but I can't fix it if I don't know what I did. I have also closed and reopened VS.
|
By Trent L. Taylor - 10/31/2006
I haven't heard of this before...the only thing I can think of is that some "rightToLeft" property has been set. This property exists for languages who go backwards This is definitely nothing StrataFrame specific, but I know that .NET has support for this type of functionality. The first thing I would look at is the RightToLeft property.
|
By Scott - 10/31/2006
Thanks, that was the first thing that poped into my head also, but unfortunately it is set correctly. Today is one of those days that I really dislike .NET!!!!!
|
By Scott - 10/31/2006
One of the guys here figured it out. Want to have some fun..... set the left and right trim option on a bo's property, link it to the rtf control and type away.
|
By Trent L. Taylor - 10/31/2006
Really!!! I guess that is good to know. Never right trim and left trim a string and bind that property to a control....got it
|
By Chris Diesel - 6/12/2009
I know this is an old thread, but how do I deny an edit or disable edit based on the status of a record not based on security? In other words, a record is "closed out" and not allowed to be edited anymore by anyone (once again, not a security issue). I would prefer to just disable the edit button vs the user having to click on edit and then get a message but either way is better than nothing.
|
By Trent L. Taylor - 6/12/2009
I guess I may not understand your environment as this would be something that I would handle in code and just disable any edit actions or when IsDirtyChanged fired (if you are allowing edits without being in edit mode) I would test then, show a message box and then cancel the changes.
But the easiest way would be to just disable the edit if it isn't allowed. The only issue with this is if the Edit is just "disabled" then users will generally wonder why. So I generally try to show some type of message, label, etc. so that they are "clued in" as to why they cannot edit the record.
But like this thread suggests, you can use the CheckSecurity event to prevent editing as well. So all in all there are number of ways to go about this.
|
By Chris Diesel - 6/12/2009
Sorry I'm so clueless, but could you please provide a sample of using the CheckSecurity event to prevent an edit. I see conflicting info in samples here on the board vs the documentation vs what is actually available when I'm trying to code CheckSecurityEventArgs (using version 1.6.6.9). How is the edit actually cancelled through this event?
|
By Trent L. Taylor - 6/12/2009
Well, it should give you the permission key being checked. You can then create the permission info (or at least I am pretty sure you should be able to) . Try something like this:
If e.PermissionKey.Equals("MyEditKey") Then
e.PermissionInfo = New MicroFour.StrataFrame.Security.PermissionInfo(MicroFour.StrataFrame.Security.PermissionAction.Deny, "Denied", MicroFour.StrataFrame.Security.DeniedActions.Message)
End If
Let me know if you need a C# sample instead.
|
By Russell Scott Brown - 6/13/2009
I would please like to see a C# example....
|
By Trent L. Taylor - 6/15/2009
C#
if(e.PermissionKey.Equals("MyEditKey"))
{
e.PermissionInfo = new MicroFour.StrataFrame.Security.PermissionInfo(MicroFour.StrataFrame.Security.PermissionAction.Deny, "Denied", MicroFour.StrataFrame.Security.DeniedActions.Message);
}
|