My spider sense tells me that if you need to commit the transaction

On Mon, May 17, 2010 at 11:55 PM, mynkow <[email protected]> wrote:

> Hi, I just executed one test and it failed.
>
>                string modRoot = "Moderator";
>                string modA = "Fmi";
>                string modB = "Hystory";
>
>                securityRepos = new
> SecurityRepository( UnitOfWork.CurrentSession );
>                UserEntity user = userRepos.Get( 111111 );
>
>                securityRepos.CreateGroup( modRoot ); //
> _authorizationRepos.CreateUsersGroup( group);
>                securityRepos.CreateSubGroup( modRoot, modA ); //
> _authorizationRepos.CreateChildUserGroupOf( parentGroup,
> newChildGroup );
>                securityRepos.CreateSubGroup( modA, modB );
>
>                securityRepos.AllowOperationForGroup( operation,
> modRoot );  //
> _permissionBuilderService.Allow( operation ).For( group );
>
>                securityRepos.AddUserToGroup( user, modA ); //
> _authorizationRepos.AssociateUserWith( user, group );
>
>                // Why this pass? This should not pass because the
> user is not a member of ModRoot.
>                Assert.IsTrue( securityRepos.IsUserAllowed( user,
> operation, modRoot ), "ModRoot" );
>
>                // Why this NOT pass? This should pass because the
> user is a member of ModA group.
>                Assert.IsTrue( securityRepos.IsUserAllowed( user,
> operation, modA ), "ModA" );
>
>                // For the next situation, later...
>                Assert.IsFalse( securityRepos.IsUserAllowed( user,
> operation, modB ), "ModB" );
>
> --
> You received this message because you are subscribed to the Google Groups
> "Rhino Tools Dev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rhino-tools-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rhino-tools-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to