public static Map<String,Object> entityMaintPermCheck(DispatchContext dctx,Map<String,? extends Object> context){
  GenericValue userLogin=(GenericValue)context.get("userLogin");
  Locale locale=(Locale)context.get("locale");
  Security security=dctx.getSecurity();
  Map<String,Object> resultMap=null;
  if (security.hasPermission("ENTITY_MAINT",userLogin)) {
    resultMap=ServiceUtil.returnSuccess();
    resultMap.put("hasPermission",true);
  }
 else {
    resultMap=ServiceUtil.returnFailure(UtilProperties.getMessage(resource,"WebtoolsPermissionError",locale));
    resultMap.put("hasPermission",false);
  }
  return resultMap;
}

public static Map < String , Object > entityMaintPermCheck ( DispatchContext dctx , Map < String , ? extends Object > context ) { GenericValue userLogin = ( GenericValue ) context . get ( "userLogin" ) ; Locale locale = ( Locale ) context . get ( "locale" ) ; Security security = dctx . getSecurity ( ) ; Map < String , Object > resultMap = null ; if ( security . hasPermission ( "ENTITY_MAINT" , userLogin ) ) { resultMap = ServiceUtil . returnSuccess ( ) ; resultMap . put ( "hasPermission" , true ) ; } else { resultMap = ServiceUtil . returnFailure ( UtilProperties . getMessage ( resource , "WebtoolsPermissionError" , locale ) ) ; resultMap . put ( "hasPermission" , false ) ; } return resultMap ; }
performs an entity maintenance security check . returns haspermission = true if the user has the entity_maint permission .
