﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » BO CheckSecurity Event</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 10 Jun 2026 05:46:46 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost23489.aspx</link><description>C#&lt;br&gt;
&lt;br&gt;
[codesnippet]if(e.PermissionKey.Equals("MyEditKey"))&lt;br&gt;
{&lt;br&gt;
   e.PermissionInfo = new MicroFour.StrataFrame.Security.PermissionInfo(MicroFour.StrataFrame.Security.PermissionAction.Deny, "Denied", MicroFour.StrataFrame.Security.DeniedActions.Message);&lt;br&gt;
}[/codesnippet]&lt;br&gt;
&lt;br&gt;</description><pubDate>Mon, 15 Jun 2009 06:49:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4000.aspx</link><description>The documentation says that the event has an actionrequested, allowed and a businessobject for the checksecurityeventargs.&amp;nbsp; All I see is permissioninfo and permissionkey, am I looking at the incorrect event?&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Mon, 15 Jun 2009 06:49:46 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost23486.aspx</link><description>I would please like to see a C# example....</description><pubDate>Sat, 13 Jun 2009 20:46:06 GMT</pubDate><dc:creator>Russell Scott Brown</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost23474.aspx</link><description>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) :D.  Try something like this:&lt;br&gt;
&lt;br&gt;
[codesnippet]If e.PermissionKey.Equals("MyEditKey") Then&lt;br&gt;
            e.PermissionInfo = New MicroFour.StrataFrame.Security.PermissionInfo(MicroFour.StrataFrame.Security.PermissionAction.Deny, "Denied", MicroFour.StrataFrame.Security.DeniedActions.Message)&lt;br&gt;
        End If[/codesnippet]&lt;br&gt;
&lt;br&gt;
Let me know if you need a C# sample instead.</description><pubDate>Fri, 12 Jun 2009 09:29:30 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost23470.aspx</link><description>Sorry I'm so clueless, but could you please provide a sample of using the CheckSecurity event to prevent an edit.&amp;nbsp; 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).&amp;nbsp; How is the edit actually cancelled through this event?</description><pubDate>Fri, 12 Jun 2009 09:14:26 GMT</pubDate><dc:creator>Chris Diesel</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost23462.aspx</link><description>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.&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
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.</description><pubDate>Fri, 12 Jun 2009 08:33:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost23461.aspx</link><description>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?&amp;nbsp; In other words, a record is "closed out" and not allowed to be edited anymore by anyone (once again, not a security issue).&amp;nbsp; 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.</description><pubDate>Fri, 12 Jun 2009 07:05:41 GMT</pubDate><dc:creator>Chris Diesel</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4021.aspx</link><description>Really!!! :laugh:&amp;nbsp; I guess that is good to know.&amp;nbsp; Never right trim and left trim a string and bind that property to a control....got it :)</description><pubDate>Tue, 31 Oct 2006 21:55:43 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4018.aspx</link><description>One of the guys here figured it out.&amp;nbsp; Want to have some fun.....&amp;nbsp; set the left and right trim option on a bo's property, link it to the rtf control and type away.</description><pubDate>Tue, 31 Oct 2006 18:23:12 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4015.aspx</link><description>&lt;BR&gt;Thanks, that was the first thing that poped into my head also, but unfortunately it is set correctly.&amp;nbsp; Today is one of those days that I really dislike .NET!!!!!:angry:</description><pubDate>Tue, 31 Oct 2006 17:29:03 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4014.aspx</link><description>I haven't heard of this before...the only thing I can think of is that some "rightToLeft" property has been set.&amp;nbsp; This property exists for languages who go backwards :)&amp;nbsp; This is definitely nothing StrataFrame specific, but I know that .NET has support for this type of functionality. &lt;/P&gt;&lt;P&gt;The first thing I would look at is the RightToLeft property.</description><pubDate>Tue, 31 Oct 2006 17:22:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4013.aspx</link><description>Thanks.&lt;/P&gt;&lt;P&gt;On an off note have you every seen the text in richtextboxes start typing in reverse?&amp;nbsp; "This" would type like "sihT" and the cursor doesn't move from the left margin.&amp;nbsp; Every time I hit the space key it take me to the start of the line.&amp;nbsp; This is also happening for text boxes.&amp;nbsp; I know I did something wrong but I can't fix it if I don't know what I did.&lt;/P&gt;&lt;P&gt;I have also closed and reopened VS.</description><pubDate>Tue, 31 Oct 2006 17:10:51 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4012.aspx</link><description>Yes, all of the security hooks are still throughout the framework.&amp;nbsp; In fact, the security module just plugs the security into the application through those hooks.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; The framework will query that object whenever it needs to check security and you can return the appropriate value.</description><pubDate>Tue, 31 Oct 2006 17:04:04 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4011.aspx</link><description>We didn't purchase the security module.&amp;nbsp; Will I still be able to implement a similiar type of security thru the checksecurityevent with out purchasing the security module?&lt;/P&gt;&lt;P&gt;Basically all I want to&amp;nbsp;do is be able to determine if a record should be allowed to be edited.&amp;nbsp; If the printed property is true then I do not want to all the user to edit this record.&amp;nbsp; Similar situations if a record is older then 7 days.&amp;nbsp; Any guidence would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Tue, 31 Oct 2006 16:03:50 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4010.aspx</link><description>This event has changed with the advent of the Role-Based Security.&amp;nbsp; If you are looking in the StrataFrame Help documentation, we need to update this...sorry :blush:&amp;nbsp; Everything is now Permission based ... if you look in the Security Help you should find your updated event docs.</description><pubDate>Tue, 31 Oct 2006 15:41:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BO CheckSecurity Event</title><link>http://forum.strataframe.net/FindPost4009.aspx</link><description>[quote][b]Scott (10/30/2006)[/b][hr]The documentation says that the event has an actionrequested, allowed and a businessobject for the checksecurityeventargs.&amp;nbsp; All I see is permissioninfo and permissionkey, am I looking at the incorrect event?&lt;P&gt;Scott[/quote]&lt;P&gt;Scott</description><pubDate>Tue, 31 Oct 2006 15:12:29 GMT</pubDate><dc:creator>Scott</dc:creator></item></channel></rss>