if ( !Permissions.isAuthorized( PolicySpec.VENDOR_IAM, PolicySpec.IAM_RESOURCE_GROUP, Accounts.getGroupFullName( groupFound ), account, action, requestUser ) ) {
throw new EuareException( HttpResponseStatus.FORBIDDEN, EuareException.NOT_AUTHORIZED,
"Not authorized to update group " + groupFound.getName( ) + " by " + requestUser.getName( ) );
}
try {
<BUG>if ( request.getNewGroupName( ) != null && !"".equals( request.getNewGroupName( ) ) ) {
groupFound.setName( request.getNewGroupName( ) );</BUG>
}
<BUG>if ( request.getNewPath( ) != null && !"".equals( request.getNewPath( ) ) ) {
groupFound.setPath( sanitizePath( request.getNewPath( ) ) );</BUG>
}

if ( !Permissions.isAuthorized( PolicySpec.VENDOR_IAM, PolicySpec.IAM_RESOURCE_GROUP, Accounts.getGroupFullName( groupFound ), account, action, requestUser ) ) {
throw new EuareException( HttpResponseStatus.FORBIDDEN, EuareException.NOT_AUTHORIZED,
"Not authorized to delete group policy of " + request.getGroupName( ) + " by " + requestUser.getName( ) );
}
try {
groupFound.removePolicy( request.getPolicyName( ) );
