﻿<?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  » Slight problem with SecurityUser accessing Security Editor</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 31 May 2026 08:25:35 GMT</lastBuildDate><ttl>20</ttl><item><title>Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32708.aspx</link><description>When I log into the application using "secusr" and password, I can test to see if that account has the&amp;nbsp;permission to access the security editor or not (and appropriately enable or disable the&amp;nbsp;associated button).&amp;nbsp; But, when I launch the form as "secusr" I receive a&amp;nbsp;unhelpful error message "Access denied".&lt;br/&gt;&lt;br/&gt;&lt;a href="http://drive.google.com/file/d/0BzuGM0X0_h52Z1NkcXZFdnF6Rmc/view?usp=sharing"&gt;Here&lt;/a&gt;&amp;nbsp;is a short video.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]if (SecurityBasics.CurrentUser.GetPermission("Security Editor").Action == PermissionAction.Grant)&lt;br/&gt;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmdSecurity.Enabled = true;&lt;br/&gt;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;&amp;nbsp;&amp;nbsp; else if (SecurityBasics.CurrentUser.UserPK == -2)&lt;br/&gt;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmdSecurity.Enabled = true;&lt;br/&gt;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;&amp;nbsp;&amp;nbsp; else&lt;br/&gt;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp; cmdSecurity.Enabled = false;&lt;br/&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span&gt;[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Another oddity that shouldn't "be" is the request for "Security Editor" permission should be "Grant" for both the "secusr" and "administrator" account ... isn't that the way of it?</description><pubDate>Wed, 22 Oct 2014 02:58:14 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32729.aspx</link><description>You're most welcome. &lt;span&gt;:cool:&lt;/span&gt;</description><pubDate>Wed, 22 Oct 2014 02:58:14 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32728.aspx</link><description>Yep ... works great ... thanks for saving me the time of digging into the security module myself!&lt;br/&gt;&lt;br/&gt;&lt;div&gt;C. T.</description><pubDate>Tue, 21 Oct 2014 22:24:11 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32727.aspx</link><description>Hi Charles.&lt;br/&gt;&lt;br/&gt;Your sample helped a lot, since as you stated, it didn't work over here either!&lt;br/&gt;&lt;br/&gt;The thing is, I was testing with my applications, and I never remembered I had a fix on them already to make it work. It seems that there is a bug in the Security Module about the "SecurityMaintenanceKeyPrefix" and you can find all explanation about it on the following thread:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://forum.strataframe.net/FindPost25258.aspx"&gt;http://forum.strataframe.net/FindPost25258.aspx&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Anyway, the short answer for this is to add the following line in your Program.cs and then you should be fine:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]&lt;/span&gt;&lt;span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl04_lblFullMessage"&gt;SecurityBasics.SecurityMaintenanceKeyPrefix = "Security ";&lt;/span&gt;[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Hope it helps.&lt;br/&gt;&lt;br/&gt;Cheers.&lt;br/&gt;&lt;br/&gt;Ivan</description><pubDate>Tue, 21 Oct 2014 16:20:29 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32726.aspx</link><description>Hi Ivan:&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;a href="http://drive.google.com/file/d/0BzuGM0X0_h52aUpyd2ZJQy1RZXc/view?usp=sharing"&gt;Here&lt;/a&gt; is an example of the problem in a brand new StrataFrame WinForms app with Security.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;a href="http://drive.google.com/file/d/0BzuGM0X0_h52VzJKcDRsY21zWXM/view?usp=sharing"&gt;Here&lt;/a&gt; is the project all zipped up ... I included the .bak file for the associated database but you probably will not need that.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;div&gt;Thanks for the continued support.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;C. T.</description><pubDate>Tue, 21 Oct 2014 08:38:10 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32715.aspx</link><description>I have tried to reproduce this issue on my environment and haven't been able to. If you don't mind creating a small sample application using the SF Sample Database which reproduces this behavior, please do it and upload it over here so I can see if I am able to find something.</description><pubDate>Wed, 15 Oct 2014 08:51:50 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32714.aspx</link><description>The code snippet is the accurate data ... &lt;a href="http://drive.google.com/file/d/0BzuGM0X0_h52bmdiWHcwR2c1ZUU/view?usp=sharing"&gt;here &lt;/a&gt; is an illustration of the problem ... the video is still appropriate too.</description><pubDate>Mon, 13 Oct 2014 21:39:03 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32713.aspx</link><description>It might just be a typo then, but in your original message you stated that you use "&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;secusr" to login, but then you have set your security user as "SecurityUser", according to your last message.&lt;br/&gt;&lt;/span&gt;</description><pubDate>Mon, 13 Oct 2014 18:18:56 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32712.aspx</link><description>Yes ...&lt;br/&gt;&lt;br/&gt;&lt;span&gt;&lt;span&gt;[codesnippet]SecurityBasics.SecurityMaintenanceUserName = "SecurityUser";&lt;br/&gt;SecurityBasics.SecurityMaintenancePassword = "secusr" + DateTime.Now.Day.ToString();&lt;br/&gt;SecurityBasics.SecurityMaintenanceUserPk = -2;[/codesnippet]&lt;/span&gt;&lt;/span&gt;</description><pubDate>Mon, 13 Oct 2014 08:25:54 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>RE: Slight problem with SecurityUser accessing Security Editor</title><link>http://forum.strataframe.net/FindPost32709.aspx</link><description>In the "AppMain.vb / Program.cs", have you set the SecurityMaintenanceUserName as bellow?&lt;span&gt;&lt;br/&gt;&lt;br/&gt;[codesnippet]&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;SecurityBasics&lt;/span&gt;.SecurityMaintenanceUserName&amp;nbsp;=&amp;nbsp;&lt;span style="color:#a31515;"&gt;"YourSecurityMaintenanceUsername"&lt;/span&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;SecurityBasics&lt;/span&gt;.SecurityMaintenancePassword&amp;nbsp;= &lt;span style="color:#a31515;"&gt;"&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&lt;span style="color:#a31515;"&gt;YourSecurityMaintenance&lt;/span&gt;Password"&lt;/span&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#2b91af;"&gt;SecurityBasics&lt;/span&gt;.SecurityMaintenanceUserPk&amp;nbsp;=&amp;nbsp;-2&lt;span&gt;[/codesnippet]&lt;/span&gt;</description><pubDate>Fri, 10 Oct 2014 05:21:02 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>