Security Editor does not open


Author
Message
Sachin Saxena
Sachin Saxena
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 7, Visits: 23
Hi Ben and Ivan,

Thanks for the key updation. I could not get in to the documentation. Currently me and my team is working to evaluate the StrataFrame for my client.

Thanks for your reply. Smile

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hey Ben.

Never thought of the ViewSecurityKey for the SecurityDialog! w00t  I thought the user needed admin priviledges to get into it.

Thanks for the tip.

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
All StrataFrame forms have a field called ViewSecurityKey that is the security key that is checked when the form is shown to see if the user has permission to view the form.  We default the ViewSecurityKey of the SecurityDialog to "Security Editor".  This allows you to add a permission called "Security Editor" for the permission to get into the form.  If you don't want to use that key, then right before you call loForm.Show() (your line #4), you need to call loForm.ViewSecurityKey = "Secure".  This will set the security key for the form to the key you want to use rather than the default key for the form. 

This also means that you don't have to have the if test to check the security key before showing the form... simply set the security key to the proper key before showing the form and the Show() will check all of the security for you (and show the denied message when the user doesn't have permission to view it).

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Sachin.

Try changing your IF statament to:

If SecurityBasics.CurrentUser.IsAdministrator

Also, have a look at the help file under:

"Role-Based Security" / "Defining Security within the Application" / "Programatic Access" / "Security Basics Class" / "Built-In Accounts" -- here you find an explanation for built-in accounts you can set up in the Program.cs, if you need.

You may also have a look at the topic:

"Role-Based Security" / "Defining Security within the Application" / "Calling the Security Maintenance Dialog" for some more features about it.

Hope it helps.

Sachin Saxena
Sachin Saxena
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 7, Visits: 23
Hi,

I created an application with various forms and I created users, permission and assign permission to each user.

Everything works fine besides it that whenever I click on "SecurityEditor" button in my application it show me "Access Denied" pop up even user is autorized to open the security editor.

1. if (SecurityBasics.CurrentUser.GetPermission("Secure").Action == PermissionAction.Grant){

2. loForm = new SecurityDialog();

3. loForm.MdiParent = this;

4. loForm.Show();

5. }

6. else

7. {

8. MicroFour.StrataFrame.Messaging.MessageForm.ShowMessage("Access Denied", "Access 9. has been denied to the security editor.", ""

10. MicroFour.StrataFrame.Messaging.MessageFunction.OK,

11. MicroFour.StrataFrame.Messaging.MessagingIcon.Forbidden,

12. MicroFour.StrataFrame.Messaging.MessagingSounds.Warning);

13. }

Here debugger crossed the line 1 and whenever it reaches the line no 4 it shows the pop up "Acccess Denied". Why?

I could not understand it. Can you help me to solve this problem?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search