protected void filterClosedAccounts ( UserIdentityContext userIdentityContext , String path ) { if ( userIdentityContext . getEffectiveAccount ( ) != null && ! userIdentityContext . getEffectiveAccount ( ) . getStatus ( ) . equals ( Account . Status . ACTIVE ) ) { if ( userIdentityContext . getEffectiveAccount ( ) . getStatus ( ) . equals ( Account . Status . UNINITIALIZED ) && path . startsWith ( "Accounts" ) ) { return ; } throw new WebApplicationException ( status ( Status . FORBIDDEN ) . entity ( "Provided Account is not active" ) . build ( ) ) ; } }
filter out accounts that are not active