HighTechTalks DotNet Forums  

COM+ querying roles applied to methods

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss COM+ querying roles applied to methods in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Brendon
 
Posts: n/a

Default COM+ querying roles applied to methods - 04-28-2005 , 11:58 AM






Is it possible to query the roles that are applied to
various methods using method level security in COM+? E.g
iterating through methods and discoverying 1) if any role
based security is applied and 2)which role(s) are applied.

Perhaps this is wishful thinking but I am trying to allow
my rich client to disable buttons based on the methods that
the user has access to - using method level security that
is totally configurable from COM+ admin.
This will then allow security to be applied to an
application without having to hard code any role checking -
so giving total configurability. Is this a good idea?,
perhaps there are other drawbacks to this - if so I would
be interested in discussing them.

Cheers,
Brendon

Reply With Quote
  #2  
Old   
Tomas Restrepo \(MVP\)
 
Posts: n/a

Default Re: COM+ querying roles applied to methods - 04-28-2005 , 08:13 PM






Brendon,

Quote:
Is it possible to query the roles that are applied to
various methods using method level security in COM+? E.g
iterating through methods and discoverying 1) if any role
based security is applied and 2)which role(s) are applied.
Perhaps this is wishful thinking but I am trying to allow
my rich client to disable buttons based on the methods that
the user has access to - using method level security that
is totally configurable from COM+ admin.
This will then allow security to be applied to an
application without having to hard code any role checking -
so giving total configurability. Is this a good idea?,
perhaps there are other drawbacks to this - if so I would
be interested in discussing them.
Theoretically, it is possible, by using the COMAdmin API through COM
Interop. However, it would probably require security access of levels the
normal user won't have, I guess, so it would likely not be an option (and it
would probably suck, performance wise).

I don't think this really is what the COM+ designers had in mind for this.
Besides, chances are that menu options (or whatever) won't quite match the
logical roles created and the methods assigned to them, so I'm not totally
sure this would even be the best option if possible...


--
Tomas Restrepo
tomasr (AT) mvps (DOT) org
http://www.winterdom.com/




Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: COM+ querying roles applied to methods - 05-03-2005 , 07:35 AM



Thanks - that's probably saved me a lot of time...

Just in response to your last point:

Quote:
Besides, chances are that menu options (or whatever) won't
quite match the
logical roles created and the methods assigned to them, so
I'm not totally
sure this would even be the best option if possible...
For menu items or buttons that call a set COM+ method, the
dependency is defined in code, and I don't think there
needs to be any awareness in the code of what roles or
access has actually been set-up, unless you were trying to
conditionally call different COM+ methods based on a users
role membership.

Any way looks like I'll be stuck with including com+
specific code in my server components for various reasons.
Unfortuantly this seems to make testing and debugging a
lot more cumbersome - I'm having lots of problems at the
moment but will post in seperate thread...

Cheers,
Brendon.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.