﻿<?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 » Role Based Security  » How to bypass security</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 03:12:14 GMT</lastBuildDate><ttl>20</ttl><item><title>How to bypass security</title><link>http://forum.strataframe.net/FindPost20723.aspx</link><description>I've been wondering if there is an easy way in a development environment to bypass the RBS security?&lt;br&gt;
&lt;br&gt;
I've been trying to comment out some of the code in the program.cs file (security objects and method calls), thinking that this would turn off the security.  But even after commenting out this code, my custom login form continues to get called, even though all the objects and references have been commented out.  Is this tied in to the app another way after its been built?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Doug.</description><pubDate>Wed, 12 Nov 2008 13:19:43 GMT</pubDate><dc:creator>Doug Zapp</dc:creator></item><item><title>RE: How to bypass security</title><link>http://forum.strataframe.net/FindPost20736.aspx</link><description>Thanks guys.  I like using the directive approach.  Nice and clean.  Much appreciated.</description><pubDate>Wed, 12 Nov 2008 13:19:43 GMT</pubDate><dc:creator>Doug Zapp</dc:creator></item><item><title>RE: How to bypass security</title><link>http://forum.strataframe.net/FindPost20732.aspx</link><description>Hi Doug, &lt;P&gt;I use the following code in the AppMan.vb &lt;FONT size=2&gt;ShowLoginAndInitMainForm()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;[codesnippet][code]&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;#If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; DEBUG &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Use a predefine login name while testing the application in debug mode.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;Login.SetLoggedInUser(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"Administrator"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"admin"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; DateTime.Now.Day.ToString(), &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;' Login.SetLoggedInUser("Angel", "jefecito", "")&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;' Login.SetLoggedInUser("Jeannette", "abc123", "")&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;#Else&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;'-- Show the login form and authenticate the user&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;e.ShowMainForm = Login.ShowLoginAndAuthUser(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;#End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;[/code][/codesnippet]&lt;/P&gt;&lt;P&gt;As you can see, while in DEBUG when running the application it will login the Administrator user or any other users I have to test their roles, else it will show the Login form.&amp;nbsp; Maybe you are looking to do the same.&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 12 Nov 2008 10:40:39 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to bypass security</title><link>http://forum.strataframe.net/FindPost20726.aspx</link><description>The way that the RBS was designed to bypass security is the Administrator password.&amp;nbsp; When you login with the administrator password, then it is like not having security implemented as all features and functionality will be granted.&lt;/P&gt;&lt;P&gt;If you do not want to show the login form altogether, but keep RBS intact, then you will need to handle this in the Appmain.vb or program.cs.&amp;nbsp; You will want to manually call the authentication methods in security and pass over the Administrator password.&amp;nbsp; You would handle this in the ShowLoginAndInitMainForm method in the Appmain.vb or program.cs file.&lt;/P&gt;&lt;P&gt;You can manually verify authentication with the AuthenticateUser method:&lt;/P&gt;&lt;P&gt;[codesnippet]MicroFour.StrataFrame.Security.Login.AuthenticateUser(...)[/codesnippet]</description><pubDate>Wed, 12 Nov 2008 09:25:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>