How to use CAZE with COM+ roles
In order to use a COM+ role for authorization checking with CAZE,
you have to add a
ComPlusRole
instance to the authorization policy and make sure that you set the
ComPlusRole.ComPlusRoleName
property of the role
to the name of the COM+ role as the following sample code illustrates:
[Visual Basic]
Imports LaMarvin.Constable
Imports LaMarvin.Constable.Model
Dim policy As New Policy
policy.Roles.Add(New ComPlusRole("Creator", "COM+ Creators"))
policy.Roles.Add(New ComPlusRole("Remover", "COM+ Removers"))
[C#]
using LaMarvin.Constable;
using LaMarvin.Constable.Model;
AuthorizationPolicy policy = new AuthorizationPolicy();
policy.Roles.Add(new ComPlusRole("Creator", "COM+ Creators"));
policy.Roles.Add(new ComPlusRole("Remover", "COM+ Removers"));
Now membership to the Creator role will be resolved by COM+
as membership to the COM+ Creators role. Similarly,
membership to the Remover role will be resolved by COM+
as membership to the COM+ Removers role.
See also the CAZE role resolution process
for more information.
|