StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



CurrentUserChangedExpand / Collapse
Author
Message
Posted 10/09/2006 1:21:01 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
Posts: 77, Visits: 804
I am handling this event to change some UI elements based on SecurityBasics.CurrentUser object. For example, changing the text on the status bar to show the currently logged on user. This works fine.

The problem I'm having is that the method GetPermission is returning the same action as the previously logged on user. Specifically, I have the menu item "Manage Security Options". I only want this menu item enabled if the user is assigned an Administrative role.

This works fine if I initially login with a user that doesn't have admin role assigned (the menu is disabled). However, if I initially login as admin, logout (using the session object), then log back in (as non admin user), the menu item remains enabled.

Stepping through the code indicates GetPermission is returning Grant for the new user, despite the user isn't assigned the admin role.

BTW...thanks for setting up the forum!

Post #3410
Posted 10/09/2006 1:36:30 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:24:42 AM
Posts: 2,686, Visits: 1,889
I was looking through the user changing code, and as far as I can tell, nothing is being saved from one user to the next... on your user without admin privilages, is the permission you are querying for the menu item denied to the user or not assigned to the user?  If it is explicitly denied, then I'll need to try and reproduce your scenario, but if it is just not assigned to the user, then the default permission (assigned through SecurityBasics.DefaultPermissionInfo property) should be returned.  So, if your default permission is Granted, then I'll need to look at why the menu option is initially disabled.


www.bungie.net
Post #3412
Posted 10/09/2006 1:47:22 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
Posts: 77, Visits: 804
Uhhg!!

I am really sorry. I have been working non-stop trying to get this project out the door and forgot that I had setup another user.

With all that you guys are doing, the last thing you need is a goose chase. Again, sorry for the misdirection.

More coffee...that's what I need...

Post #3414
Posted 10/10/2006 9:03:51 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:24:42 AM
Posts: 2,686, Visits: 1,889
Hehe, not a problem   I do that to myself quite often... I have several security projects going at the same time, and rather than deploying the data each time I want to debug, I just point my SecurityDataSourceKey to the StrataFrame database and use the development data... but the runtime has no notion of "security projects" so they all get mixed together and sometimes I don't realize that I have two users with the same username in two different projects and it grabs the wrong one


www.bungie.net
Post #3439
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 1:41pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.